How to merge local projects into github?

push project1 project2 from pc1 to my github.
now, I have modified project2 on pc2. I need to push this project2 from pc2 to github and replace the original project2 with this modified project2.

git init
git add project2/
git commit -m "merge"  
git remote add origin  https://xxxx@github.com/xxxx/mytest.git
git push origin master  -f 

after the above operation is completed, Admiral github will have only project2, "s original project1 project2 and only project2.
excuse me, how can I do this on pc2?

Mar.21,2021

you are a warehouse with two projects.
as long as you have a good git connection, there is no conflict at all. Git will associate you with any file you change.
suppose you now have a warehouse on github:

https://xxxx@github.com/xxxx/.

there are two projects project1 and project2 under the warehouse.
when you are in pc2, what you should do is:

git clone https://xxxx@github.com/xxxx/. / / https if not, try ssh

after the clone is completed, each time you modify the projet2, you only need to execute:

git add . // 
git commit -m "project2"
git push origin master // github

after push is completed, project2 modification is completed, and project1 will not be affected


personal thoughts:

  1. delete the project1,project2 item on github
  2. push the new project2 to github
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b37526-2c07e.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b37526-2c07e.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?