Skip to content

Instantly share code, notes, and snippets.

@bbrt3
Last active August 6, 2021 14:04
Show Gist options
  • Save bbrt3/f5ac091216b75b14aea55f6af158006b to your computer and use it in GitHub Desktop.
Save bbrt3/f5ac091216b75b14aea55f6af158006b to your computer and use it in GitHub Desktop.
git
git reset --soft - all changes go to staging area's state
git reset --mixed - all changes go back to working directory's state
git reset --hard - all changes go to trash
Let's assume that you have branch named "routing” and you are working on it. 
At first, make sure your git fetch  and git pull master (or like previously in our team table-view-of-events) 
Then you need to create new branch based on master (or like previously in our team table-view-of-events) 
     You can name it like for example routing-rebase1 
     It will be on your local machine, no need to push it to ADO
 
Then, you need  git checkout routing-rebase1 
 
Next, you need to  git merge routing 
 
Resolve conflicts manually 
 
Then, you need to  git push origin routing-rebase1:routing 
 
So, at first you need to provide your local branch (rebase branch), ten you need to provide your remote branch. 
Bonus tip: If you got stuck by using the  git rebase  you can get out of it by typing  git rebase --abort  
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment