Git Learning Part III - working remotely (Github)

help document of Github : https://help.github.com/

 upload

1.1 new update

 Initialize a repository 

Create a repositoy and name it while selecting "with a  README" option.

 tips:

1.push a new branch to the remote : $ git push -u origin <branch name>

2.add your remote: $ git remote add origin <URL>

3.check your remote: $git remote -v

 

4.change your remote: $ git remote set-url origin <URL>

1.2 upload directly

 Type $ git push  after checking the remote to upload your repo directly.

 

1.3 upload modification

 Edit the file and use $ git push to update modifications to remotes.

check Github:

 

2 download

2.1 download your repo

Copy the URL of the repository to clone. Simply click on the clipboard button on the right side.

 

Go to the local root folder and open a Bash Shell within it.

 Type $ git clone https://github.com/LuoYuY/fisrt-repo.git

Check the folder.Git had created a new first-repo folder that contains the downloaded copy of our repository.

 

2.2 download others' work

 Find the repo you want and click on the fork button. Then clone it in your Github.

 

posted on 2018-08-24 11:12  洛小侠  阅读(293)  评论(0编辑  收藏  举报

导航