git rebase i vs git rebase --onto -


i think made mistake. wanted delete commit, used git rebase -i , deleted last commit. deleted changes have made in working directory , stage ones. how can be? know wouldn't have had problem if deleted older commits. there way delete last commit , keeping changes in working directory?

btw, difference between using git rebase -i , git rebase --onto <branch name>~<first commit number remove> <branch name>~<first commit kept> <branch name>?

git rebase won't launch @ if you've got uncommitted changes known files. it'll fail error:

cannot rebase: index contains uncommitted changes. 

some variation of error has been around since 2007. how did launch git rebase -i @ all?

that written, question relates git rebase -i's defaults. without arguments, it'll default checked-out branch, , attempt rebase against <remote>/<branch> configured 'upstream' of branch you've checked out. can check branch's upstream repository , branch with:

git config branch.<branch_name>.remote git config branch.<branch_name>.merge 

Comments

Popular posts from this blog

java - Run a .jar on Heroku -

java - Jtable duplicate Rows -

validation - How to pass paramaters like unix into windows batch file -