git remote -v
git fetch origin
git reset --hard origin/master
- remote
git branch -r
- local
git branch
If you want to merge one of those remote branches on your local branch
- Go to your branch
git checkout youbranch
git merge origin/aRemoteBranch
If you want to merge one of your local branch on one of those remote branch, you need to create a local branch on top of said remote branch first
git checkout -b myBranch origin/aBranch
git merge aLocalBranch
- Check out how many commit do you have with
git log --graph --decorate --pretty=oneline --abbrev-commit
- run
git rebase -i HEAD~(number of commits)
- just change the
pick
tof
for the commit you do not want to pick - save
git -d <branch-name>
if the branch is not merge use-D
git push origin :<branch-name>