Advanced Git

git rebase

git merge

basics

Single Branch FLow Demo

git pull --rebase

Foreign Branch Flow Demo

git pull


git rebase origin/[remote_branch_name]
git pull
git rebase origin/[remote branch name]


// Read the status carefully
// In case of conflict it should list conflicting files
// for example:
// CONFLICT (content): Merge conflict in README.md


// list files that have conflicts
git status


// resolve conflicts by editing these files and 
// removing changes that are not necessary
// when done add those changes to staging

git add .

// continue with rebase

git rebase -- continue

// this parth is important:

git push --force-with-lease


// if you are unable to resolve conflics 
//(you are not sure which changes need to be removed)
// you can abort using

git rebase --abort

git rebase

By Rinat U

git rebase

  • 207