Note that there are some explanatory texts on larger screens.

plurals
  1. POI think I don't understand git branches
    text
    copied!<p>Salutations everyone,</p> <p>I have been working on a bash script as a small summer project to learn more about UNIX scripting and on using git.</p> <p>This has been the first time that I have used branches in git, normally I just stick to master.</p> <p>I was viewing the git log with the graph (<code>git log --graph</code>) when I noticed that my 'develop' branch seemed to have merged with 'master'. Something like this:</p> <pre> master ----1--------3----4----5----6----HEAD develop \---2---/ </pre> <p>but commits 3 onwards were done within the develop branch. Doing <code>git checkout master</code> and <code>git checkout develop</code> showed this to be true.</p> <p>What exactly is going on? Is this what is known as fast-forwarding?</p> <p><strong>UPDATE #1:</strong></p> <p>Commit 1, isn't actually the first commit in my repo, its the last commit I made on 'master'</p> <p><strong>UPDATE #2:</strong></p> <p>This is the graph as given in <code>gitk --all</code></p> <pre> Tag '1.0-0' | master --*--*--*--*--*--*----2\ develop \1----3----4----5----6 </pre> <p><strong>UPDATE #3:</strong></p> <p>I have had a closer look at <code>gitk</code> and have discovered that all commits up until commit 1 happened both in the 'develop' branch as well as the 'master' branch.</p> <p>Thanks to SimoneDemoGentili for pointing out my incorrect use of <code>git checkout develop</code></p> <p>P.S.: Commits 1 and 2 are also a mystery to me being that commit 2 is actually an amendment of commit 1 (as far I thought, I used this <a href="http://nathanhoad.net/git-amend-your-last-commit" rel="nofollow">advice</a>)</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload