Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot see branch history on github

I am new to Git and Github. I am using terminal to use git commands. So, I create a repository on Github. I clone it on my local machine. Then, if I create a branch using git command, I can see that I am switching branch. I am able to edit the code in that branch and I am able to merge the branch to master branch as well.

When I check on Github, I don't see any history of the branches that I have made and all the changes that I make in other branches and merge them to master, they still are portrayed as a single change made on the master branch on Github when I push the code.

I would like to know how my changes in branch and merging can be reflected in Github and some relevant resource about this will be helpful.

like image 308
PushkarKadam Avatar asked Feb 12 '18 06:02

PushkarKadam


Video Answer


1 Answers

You can check the commit as graph in github by below steps:

Insights page -> Network tab.

enter image description here

All of your branches of the github repo will show as graph, and you can find the relation and actions between branches by the graph.


For fast-forward merge:

If your commit history looks as below:

...---A---B---C   master 
               \
                D---E  somebranch

Since there have been no new changes on master branch, when you merge somebranch into master (git merge somebranch), master branch will point to the commit E same as somebranch point:

...---A---B---C---D---E   master, somebranch
like image 133
Marina Liu Avatar answered Sep 30 '22 05:09

Marina Liu