简体   繁体   中英

github - code pulled from master,push changes to new branch

我正在一个项目中,该项目是从“ master” github分支创建本地存储库的。但是不久之后又从master分支了一个新分支。现在,我想将更改推送到新分支。我想避免合并现在,只需将当前的本地代码库推送到新分支即可。有关正确方法的任何建议?

You can use git checkout -b newBranchName this will create a new branch with all of your commits and files. You can the push this changes without effecting the master branch.

Create local branch git checkout -b myLocalBranch . Pushing this branch to repo git push origin myLocalBranch .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM