I have this scenario:
Dev
is my machine which I use to develop on, I created a git repo on it and commit to it regularly.
Staging
is a server which I use to upload "stable" versions of my work to, I created a repo there too and added this server to the Dev
remote repos
Whenever I want to push I simply use $ git push Staging master
, this appears in the server immediately but in order to use the new code I need to do $ git reset --hard HEAD
otherwise git thinks that I've edited the files on Staging
and I don't have the "new" files.
I'm also not getting the part of Submodules in Git - I've tried a few techniques, mainly git submodule add https://github.com/documentcloud/underscore.git local/sub/dir/underscore
, but I'm not getting any results except a dump of my current system $PATH
value.
Help would be very appreciated! :)