What's the right way to commit git changes
I am 开发者_运维百科exploring on GIT, but I am wondering what's the best way to keeping my code updated.
Should I always pull (keeping code updated) before I pushing my commit? Or if I keep commit my updates without pulling will it cause conflicts?
Thanks
You can't push if you haven't pulled changes from your remote.
As with every source control, the best thing is to integrate often, and so I recommend dividing your work to small commits and then pushing them as often as you can.
A good flow IMO would be you committing a couple times an hour and every hour or so you'd pull changes from your team and push yours out.
精彩评论