简体   繁体   中英

How to pull untracked files with git

The title may not be clear but my issue is, I have a laravel project on gitlab. I cloned the project from the master branch then after running composer install I realized that the bootstrap/autoload.php file was missing.

But on the develop branch it is there. I merged the develop branch into master but it is not getting the bootstrap/autoload.php file. I noticed that the last commit on that file was a year ago, so it has been missing for a while, I just didn't notice.

I also noticed that there were other files on the develop branch that were not getting merged into master.

I checked all my .gitignore files to see if the corresponding files were added but that's not the case because they wouldn't be on gitlab on the develop branch in the first place.

When I run git status on master it says It is up to date. How do I get those missing files merged into master.

I fixed the issue by checking out all the files from the develop branch to master branch:

git checkout origin/development -- .

This gave me all the files that were missing from master but were in develop

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