9/20/2023 0 Comments Smartgit default squash dateThis reference complements the first one nicely with more of a focus on those less acquainted with git. (that link points to github's "network" visualization tool) And here is another great reference with illustrations. Using -no-ff allows someone reviewing history to clearly see the branch you checked out to work on. ![]() Until I saw this, I was completely lost with git. Here is a site with a clear explanation and graphical illustration of using git merge -no-ff: This way you can regularly do something like git pull -ff-only without thinking, and then if it errors out you can go back and decide if you want to merge or rebase. Similarly, if you want to execute a git pull or use git merge in order to explicitly fast-forward, and you want to bail out if it can't fast-forward, then you can use the -ff-only flag. In order to do that, you can pass the -no-ff flag and git merge will always construct a merge instead of fast-forwarding. you're merging in a topic branch and you want to ensure it looks that way when reading history). However, occasionally you want to prevent this behavior from happening, typically because you want to maintain a specific branch topology (e.g. This commonly occurs when doing a git pull without any local changes. A fast-forward is when, instead of constructing a merge commit, git just moves your branch pointer to point at the incoming commit. ![]() The -no-ff flag prevents git merge from executing a "fast-forward" if it detects that your current HEAD is an ancestor of the commit you're trying to merge.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |