merge - How to update my local repo using git pull without pushing -
i have local branch haven't done changes. do
git checkout anotherbranch # switched branch 'anotherbranch' # branch behind 'origin/anotherbranch' 25 commits, , can fast-forwarded. # (use "git pull" update local branch)
so apparantly need pull latest changes. this
git pull origin anotherbranch
i expect in sync, isn't because
git status on branch anotherbranch branch ahead of 'origin/anotherbranch' 2 commits. (use "git push" publish local commits) nothing commit, working directory clean
is because merge part of git pull added 2 commits? these commits not show when git log. instead on top 2 commits made author. feels wrong me push 2 commits. don't want push @ update local branch. how can this? in case git pull mistake how can revert without producing alternative realities or other git horrors (i haven't pushed anything, except on feature branch)
git status on branch anotherbranch branch ahead of 'origin/anotherbranch' 2 commits. (use "git push" publish local commits)
it means have 2 commits not pushed.
as best practice run
git fetch
once in while server metadata (updated deleted branches, new commits etc)
what results of command:
git log --oneline
it show log commits yu can see problem
Comments
Post a Comment