4 ms·
Simple Daily Git Workflow at Gameplan (Cheatsheet included)
- philwelch 16y agoNeat introduction to git, but it suggests using the "git commit -a -m" option, which is not only (edit: partially) redundant with the "git add ." command it recommends using beforehand, but actually interferes if you're trying to make a more selective commit.
- gonepostal 16y agoThe -a switch for the commit command will only add changes from all files listed in the index. "git add ." will add changed files that are in the index and those that are not. So they are not redundant commands.
- pyre 16y agoHuh? They are redundant if you run them in succession. If you've just added all changes to the index, there is no need to use the -a option to commit unstaged changes to files in the index.
- iamclovin 16y agoYou're right about them being redundant if run in succession. Fixed in the post, thanks!
- prosa 16y agoIf you are going to branch every day as you begin your work, rebasing is a useful alternative to merging when you complete your task. You get the benefits of separation and the optionality of throwing away your branch if you choose, but you also keep the commit logs a bit easier to follow. Worth considering :)
- luigi 16y agoAgreed, rebasing makes things much cleaner. http://geewax.org/2009/11/21/agile-git-workflow.html http://geewax.org/2009/11/21/agile-git-workflow.html http://reinh.com/blog/2009/03/02/a-git-workflow-for-agile-teams.html http://reinh.com/blog/2009/03/02/a-git-workflow-for-agile-te... http://gweezlebur.com/2009/01/19/my-git-workflow.html http://gweezlebur.com/2009/01/19/my-git-workflow.html http://blog.hasmanythrough.com/2008/12/18/agile-git-and-the-story-branch-pattern http://blog.hasmanythrough.com/2008/12/18/agile-git-and-the-...
- LiveTheDream 16y agoRebasing definitely keeps the logs cleaner. Set up branches to rebase automatically with 'git config --global branch.autosetupbase always': [branch] autosetuprebase = always
- WALoeIII 16y agoUse Buildmeister! My co-worker wrote a cool little tool wrapping this common workflow up so you can have single line deploys to staging that merge bug/feature branches. http://leigh.onehub.com/buildmeister-talk http://leigh.onehub.com/buildmeister-talk
- d0m 16y ago.. I feel like I've lost 10 secs reading this. I mean, there are so many git workflow and tutorial, this one is like the first 2 lines of a good one but extended to a full page. Hacker News or Nooby News ? Yes down me, thanks, I'm used to it.
- truebosko 16y agoGood introductory article. I never thought about branching even on smaller features (only do it for big ones) but it makes sense if you need to fix something critical and you're not finished your feature. git branching is so simple I guess it makes sense to do so :)