Merge all your local commits in a single commit
Jump to navigation
Jump to search
1) Move local branch pointer
git reset --soft @{u} (no output) does not modify the upstream branch (e.g., origin/<branch>). It only affects your local branch by moving the branch pointer to the commit referenced by @{u} (the upstream tracking branch’s latest commit), while keeping all changes (from reset commits and pending changes) in your local staging area for recommitting.
2) Commit all changes that are already in your local branch
git commit -m "new consolidate commit with all previous changes"
Related[edit]
See also[edit]
Advertising: