Skip to content

Instantly share code, notes, and snippets.

@Rami-Majdoub
Last active May 17, 2020 22:50
Show Gist options
  • Select an option

  • Save Rami-Majdoub/42df9c5f78c18aae0be414a8b29f7304 to your computer and use it in GitHub Desktop.

Select an option

Save Rami-Majdoub/42df9c5f78c18aae0be414a8b29f7304 to your computer and use it in GitHub Desktop.

create feature branch and adding features

  • get the latest version of master (sync master)
    git pull

  • create feature branch
    git checkout -b my-cool-feature

  • add files and commits
    git add index.html
    git commit -m 'home page'

merge to master

  • go to master
    git checkout master

  • get the latest version of master (sync master)
    git pull

  • go to feature branch
    git checkout my-cool-feature

  • translate the commits of feature branch on the latest commit of master (could be there conflicts with master commits)
    git rebase origin/master

  • go to master
    git checkout master

  • copy feature branch commits to master
    git rebase origin/my_cool_feature

  • update remote master
    git push

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment