Git rebase (Merge Squash) my feature branch onto another branch -


i'm looking git command me feature branches when they're ready go master. git command squash changes on branch single commit on top of master. today with:

git rebase origin/master git rebase -i head~4 

where 4 number of commits squash. however, requires me know how many commits have. today running:

git log head...origin/master 

and counting commits.

i feel though there should better way this. or how else it, too?

all have is:

git checkout feature_branch git rebase master git checkout master git merge --squash feature_branch 

as docs git merge --squash say:

produce working tree , index state if real merge happened (except merge information), not make commit or move head, nor record $git_dir/merge_head cause next git commit command create merge commit. allows create single commit on top of current branch effect same merging branch (or more in case of octopus).

after that, can git commit changes staged.


Comments

Popular posts from this blog

delphi - How to convert bitmaps to video? -

jasper reports - Fixed header in Excel using JasperReports -

python - ('The SQL contains 0 parameter markers, but 50 parameters were supplied', 'HY000') or TypeError: 'tuple' object is not callable -