Not to mention the previous steps, create a new Github account, create a new warehouse, generate a key with ssh-keygen, upload the pub key, and copy the contents of the id_rsa.pub file to github.
1.ssh -T git@github.com successfully connected
2. Established github repository
The text begins.
I want to push all the stuff in the wp folder to github.
1.git clone https://github.com/yufeiluo/n...
Initial state:
ls /home/debian8/newstart
LICENSE README.md
2. Copy the wp folder and its contents to local newstart
Before copying
After copying
3. Start git on this machine
git init
git commit -m 'newstart'
git remote add origin https://github.com/yufeiluo/newstart.git
git push origin master
Username for 'https://github.com': yufeiluo
Password for 'https://yufeiluo@github.com':
Everything up-to-date
All operations are completed, open github.
The files in wp are not pushed to github. What is the reason?
After you have established the local warehouse and added the remote warehouse, the steps to submit using git are as follows:
Add to staging area
Or submit all modified or newly added files directly:
Submit this modification
Or skip the first step and go directly:
Push to remote warehouse
In addition, as mentioned on the first floor, there is no need to use
git remote add ...
add the URL of the cloned warehouse for the cloned warehouse. Unless, that URL is for another remote warehouse.You don’t have git add and git commit.
These are all basic operations.
In addition, you cloned it directly, so don’t do git init and git remote add... anymore.
After you have established the local warehouse and added the remote warehouse, the steps to submit using git are as follows:
View current warehouse status:
Add to staging area
Or submit all modified or newly added files directly:
Submit this change
Then push to the remote warehouse
If push fails, you can try
Then push.