Git/Github 简例

1 https://github.com -> Create a new repository
https://github.com/yourname/yourrepository

2 GitBash,默认以origin标识克隆仓库。

$ git clone https://github.com/yourname/yourrepository

3

cd yourrepository
$ vim 1.txt

4 本地修改上传。

$ git add .
$ git commit -m 'v1.0'
$ git tag v1.0
$ git branch
* master
$ git push origin master

5 远程更新下载。

$ git pull origin master

//查看

$ git log  //commit日志
$ ll .git/refs/heads/  //所有分支
$ ll .git/refs/remotes/  //本仓库所有项目
$ ll .git/refs/tags/  //所有tag
cat .git/HEAD  //当前活动分支

猜你喜欢

转载自www.cnblogs.com/dailycode/p/9445737.html