简体   繁体   中英

Push temporary git branch to remote without files or changes

We have a git master branch. From this branch we create feature branches and merge those feature branches into master.

We need now a 'temporary' branch from where we branch off some feature branches. Those feature branches will be merged into the temporary branch.

How do I push the new 'temporary' branch (without any files or changes) too remote so others are also able to branch off this branch?

If I understood your problem correctly, these are the steps:

git checkout master
git checkout -b temporary
git push -u origin temporary

Then, any developer should do this:

git fetch
git checkout temporary
git checkout -b myNewBranch
<< user does things >>

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