-
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'
-
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