background preloader

Git

Facebook Twitter

Scott Chacon on the Interwebs. August 31, 2011 Issues with git-flow I travel all over the place teaching Git to people and nearly every class and workshop I’ve done recently has asked me what I think about git-flow. I always answer that I think that it’s great - it has taken a system (Git) that has a million possible workflows and documented a well tested, flexible workflow that works for lots of developers in a fairly straightforward manner. It has become something of a standard so that developers can move between projects or companies and be familiar with this standardized workflow. However, it does have its issues. I have heard a number of opinions from people along the lines of not liking that new feature branches are started off of develop rather than master, or the way it handles hotfixes, but those are fairly minor. One of the bigger issues for me is that it’s more complicated than I think most developers and development teams actually require.

Its simplicity gives it a number of advantages. GitHub Flow Conclusion. Git undo last commit. How to use git to download a particular tag. Git - How can I remove a commit on github. Keep either file in merge conflicts. Committed 25 Feb 2009 Sometimes when trying to resolve a merge, you may want to keep one file instead of the other. You don’t need to open up the files and fix the potentially hundreds of conflicts, you just want to choose the one you want and be done with it. Sadly, this isn’t exactly clear in older versions of Git, but more recent ones have made it easier. Big thanks to Kevin Old for his post on the subject which reminded me about this issue. So, the scenario is: you’re in the middle of a merge, and you want to keep one file or the other. $ git merge master Auto-merged _layouts/default.html CONFLICT (content): Merge conflict in _layouts/default.html Auto-merged index.html CONFLICT (content): Merge conflict in index.html Automatic merge failed; fix conflicts and then commit the result.

There’s two unmerged files here. The following commands will keep the original file for index.html, and then use the merged in file only for _layouts/default.html. And for --ours: