Catalog
  1. 1. Simple use
    1. 1.1. 1. Create new repository
    2. 1.2. 2. Update changes each time
Useful Git Command

Simple use

In this note I will summarize the simple use of Git. How can we create new repository and upload the local folders to remote? Or after we changes or add new files, how can we update the changes?

1. Create new repository

We should create new repository in the remote. Then we clone the remote repository into local folder. We can make changes on the folder and update the changes via

1
git add .
2
git commmit -m "changes"
3
git push -u origin master

”-u“ is for the first update.

2. Update changes each time

If the repository has been create in the remote and the local folder has push history. You can fetch changes from remote repository.

1
git pull

add new files to remote repository

1
git add .
2
git commmit -m "changes"
3
git push origin master

More details will be added if needed.

Author: Knifelee
Link: https://knifelees3.github.io/2019/12/25/A_En_Git_CommandSummary/
Copyright Notice: All articles in this blog are licensed under CC BY-NC-SA 4.0 unless stating additionally.
Donate
  • 微信
  • 支付寶

Comment