My commits on the Git tree are out of the master branch. The result of this is when I push to my central repository the commits that are out of the master branch don't get pushed.
Here is a image of what I'm talking about:
What can I do to have the commits without branch inside the master branch?
Best Regards,
Enter this into a command prompt/terminal: git branch -f master HEAD
This resets the master
branch to HEAD
, but since master
already exists, it requires the force ( -f
) parameter.
After this, check out the master
branch by executing git checkout master
and then you can push your changes and your future commits will be made on the master
branch.
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.