1.从git仓库获取代码
git clone ssh://
2.git branch
git branch -a 查看有哪些分支
git checkout SyncProction 切换至分支SyncProction
git branch 查看目前在哪个分支上
git config --global core.autocrlf false
在使用
Git的过程中,有些时候我们只想要git服务器中的最新版本的项目,对于本地的项目中修改不做任何理会,就需要用到Git pull的强制覆盖,具体代码如下:
[root
@ip
-
100
-
00
-
00
-
21
~]
# git fetch --all
[root
@ip
-
100
-
00
-
00
-
21
~]
# git reset --hard origin/master
[root
@ip
-
100
-
00
-
00
-
21
~]
# git pull
上传文件至远程仓库:
首先从Git clone仓库,再本地仓库目录新建文件夹,放入要上传的文件
git add 文件名
git commit -m “描述”
git push origin master

1098

被折叠的 条评论
为什么被折叠?



