Rebase from branch using Git


A-> branch which you are working

B-> Branch you want to rebase in A

  1. git checkout B
  2. git pull origin B
  3. git checkout A
  4. git rebase B
  5. remove conflicts in files if any and add conflict files by ‘git add file_name’ {optional step]
  6. git rebase –continue
  7. git push origin A –force

 


Example:

  1.  git checkout staging
  2. git pull origin staging
  3. git checkout booking_content
  4. git rebase staging
  5. remove conflicts in files if any and add conflict files by ‘git add file_name’ {optional step]
  6.  git rebase –continue
  7. git push origin booking_content –force
Advertisements

I am Senior Software Engineer. I love reading, writing, sharing,developing, hiking, movies, trips, mountains, brooks, hills etc.

Posted in Github

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

StackOverFlow
Categories
Archives
%d bloggers like this: