简体   繁体   中英

Forge: git pull not updating

$ git add .
$ git commit -m "commit message"
$ git push

The code gets pushed to repo as expected. However Forge deployment error message returns

branch master -> FETCH_HEAD error: Your local changes to the following files would be overwritten by merge: // ...files to change... Please, commit your changes or stash them before you can merge. Aborting

How can I resolve this? Are my commits not merged? They are on my repository. Do I need to stash? If so, what next??

Tried following other examples but unwilling to experiment without advanced knowledge of git.

Use -A instead of . with git add

$ git add -A
$ git commit -m "commit message"
$ git push

Now, try git pull .

NB: git add . stage modified and new files and git add -A stage modified , new and deleted files.

It is good use pull before push any project just use * instead of .

$ git add *
$ git commit -m "commit message"
$ git push

Turns out this was because recently I ran composer update inside ssh

Dont ever run composer update inside ssh. Run composer update inside VM / dev environment and run composer install inside ssh

This resulted in changing server permissions

I was eventually able to fix this with chgrp -R forge:www-data /home/forge/mysite.com

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