简体   繁体   中英

Push the updated master branch to remote repository which in in same project folder and configured in local git repo

I have a project in below structure

在此处输入图片说明

在此处输入图片说明

My local git repository is array_code .In array_code folder I have my latest code in codemaster branch. The remote repository has been preconfigured in to my local git repository.You can see in second image project folder.

Now how can i push the updated codemaster branch in to remote repository.

Can you please help with the command which I could figure as both are in same project folder

First, make sure your Windows Explorer show the hidden files : you will see the hidden .git which show which parent folder is a git repository, and which is not.

Second, when you have a repo in folder A, and updated sources in an unrelated folder B, you can do

cd A
git --work-tree=..\path\to\B add .
git commit -m "Import sources from B"
git push

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