My personal blog need show some pictures, I try to store the pictures in this repository.
If we create new local folder and want to upload it into remote repository. We should cd into the local folder and type
git init
This will let the local folder prepared to be a github folder. Then connect this folder to the remote folder
git remote add origin <https://gitxxxx.com/xxxxx/xxxxx.git>
The content in the "<>" should be replaced with your own git account link. Then add all files
git add .
add description
git commit -m "<some description here>"
Be careful that that "<>"
double quotation marks are needed. Then type
git push -u origin master
When prompted to update the remote repository locally, proceed with the following command
git pull
Prompt "git pull remote" and so on, continue with the following command
git pull origin master
If history related errors are prompted, continue with the following command
git pull origin master --allow-unrelated-histories
Then you can push the local folder by typing
git push origin master
If the repository has been create in the remote and the local folder has push history. You can fetch changes from remote repository.
git pull
add new files to remote repository
git add .
git commmit -m "changes"
git push origin master
This is a simple version of the command.