I am having two branches (branch-local and master, which is remote). I have made my changes in 'branch-local'. When I tried to push a commit, someone else pushed into remote master and is hence one commit ahead. Following are some commands and outputs
git branch
* branch-local
master
git log -3 --oneline
d41d364 (HEAD -> branch-local) 401 Error fix
78479c5 Changes in index.jsp
b402271 adding alert mechanism
git checkout master
20dae35 (HEAD -> master, origin/master, origin/HEAD) Correcting the json file
78479c5 Changes in index.jsp
b402271 adding alert mechanism
I want my commit on top of branch-local to be on top of mater remote. I want it to look like:
git log -3 --oneline
d41d364 (HEAD -> master, origin/master, origin/HEAD) 401 Error fix
20dae35 Correcting the json file
78479c5 Changes in index.jsp
I am very new to Git and I do not want to merge my branches as it has done multiple times in past and won't be a best practice.