Reputation: 188
I just created a GitHub account, installed Git Source Control Provider and GitExtensions to work using Visual Studio. All the setup is done, and I managed to push my local codebase to GitHub.
Now, I want that, each time I commit, my changes are reflected to my GitHub account (a push on commit basically). How to configure this ?
Upvotes: 2
Views: 2317
Reputation: 84
Not a real answer per se, but I would recommend against this methodology even if it's doable technically.
The whole idea behind keeping commits local is that you can work with your code without necessarily publishing it to the whole wide world as soon as something is committed (as happens with SVN or other centralized VCSs) while at the same time giving you the opportunity to keep snapshots of usable states of your code.
A benefit of using git and committing locally is that your behavior will start to shift to committing often. By binding together the act of committing and pushing you'll hinder your progress in committing often due to the "performance anxiety" you'll have knowing that your code is pushed every time you commit.
Only when you feel that you're finished with your effort should you push it to some other repository.
Upvotes: 1
Reputation: 1324537
I don't see any option for that kind of automated push in GitExtensions.
I would favor the git hook approach: a .git/hooks/post-commit
executable file with a:
git push origin
that supposes your git remote is up to date and that your current branch is tracking an upstream branch.
Upvotes: 0