Note that there are some explanatory texts on larger screens.

plurals
  1. POGit: Unable to understand why branch (topic) commits/merges are happening on the master branch
    text
    copied!<p>Note: I am not sure whether this has been already asked, as I can't find any question fitting to my context(or I am unable to understand the existing questions' contexts')</p> <p>I am loving Git these days. Especially, the topic branches. I am working on a small code sharing application. And I have got (local)branches like "master", "authentication", "bookmarks", "comments", "nose" etc...</p> <p>My (intended)workflow goes something like this: Create a topic branch ==> Work on the topic branch ==> Commit the files to the branch ==> Merge the topic branch changes to the "master" branch. (And later delete the topic branch)</p> <p>I tried doing the same for a couple of branches. It worked fine. But later when I checked the git graph, even if I followed the same workflow, all the chances were happening on the "master". No tree lines diverging and converging! It shows one singe line with multiple commits from then. I am not sure why? I am of the impression, I screwed something with HEAD pointer?</p> <p>To give a practical view, here is my git graph: <a href="http://github.com/madhav/zeshare/network" rel="nofollow noreferrer">http://github.com/none-da/zeshare/network</a></p> <p>Here are the commands I used:</p> <pre><code>&gt;&gt; git branch authentication_feature &gt;&gt; git checkout authentication_feature &gt;&gt; # I work with all the files here in "authentication_feature" branch &gt;&gt; git commit -m "Authentication_feature is up" # commiting to the branch &gt;&gt; git branch # just to confirm, which branch I am working on &gt;&gt; git checkout master # trying to shift to master branch &gt;&gt; git merge --no-commit authentication_feature # I merge in two steps. This is step 1 &gt;&gt; git status;git add; git commit -m "Authentication_feature" merged to "master". # This is the step 2 &gt;&gt; git log --graph --pretty=oneline # confirming the graph &gt;&gt; git push origin master # pushing to the remote server(github) </code></pre>
 

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