//pull the latest code from master branch
git pull
// crate a new branch from master
git checkout -b new_branch
//rebase
git pull original master new_branch --rebase
//commit
git commit --date="$(date -R)" --amend
//merger new_branch to master
- switch to master branch
git checkout master - pull the latest code on master branch
git pull - merge new_branch to master
git merge new_branch master - push the change to master
git push
if want to copy specific file from new_branch to master. - checkout to master
git checkout master - copy the specific file from new_branch to master
git checkout new_branch <file_papth>