I ran git checkout <branch_2>
to switch from branch_1
to branch_2
. Then, run git status
to verify up to date. However, a folder existing in branch_2
still does not show up.
As always, more information is always helpful.
I am going to assume that the "folder" you believe should be in branch_another
was never tracked in the first place.
At, @William Pursell suggestion, try placing some file inside the desired folder, then commit that to
branch_another
.
Based on what I gleaned from the comments, it sounds like when you ran git checkout
, you expected it to also get all the changes from the remote. This is not the default functionality of git checkout
. You will have to follow it with a git pull
to get the changes from remote if you have previously copied the branch to your local machine.
The caveat is that if you've never checked that branch out from remote previously, it will have to go to the remote in order to retrieve the branch, thus giving you the most up-to-date version.
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.