目录
- git –version
- git help -a
- git clone https://xxxx/xx/
- git pull
- git push
- git branch -vv
- git push –set-upstream origin master
- git pull –set-upstream origin dev
git –version
查看git版本
PS D:SourceTreerepositorypracticeServer> git --version
git version 2.35.1.windows.2
git help -a
查看命令说明,回车展示更多命令,q退出
PS D:SourceTreerepositorypracticeServer> git help -a
See 'git help ' to read about a specific subcommand
Main Porcelain Commands
add Add file contents to the index
am Apply a series of patches from a mailbox
archive Create an archive of files from a named tree
bisect Use binary search to find the commit that introduced a bug
branch List, create, or delete branches
...
git clone https://xxxx/xx/
从远端仓库克隆分支到本地
git clone https://xxxx/xx/
git pull
拉取远程仓库的更新到本地,默认拉取的分支是绑定的远端分支(使用命令git branch -vv 查看关联情况)
可以使用 git pull origin master 指定远程仓库的分支
PS D:SourceTreerepositorypracticeServer> git pull
Already up to date.
PS D:SourceTreerepositorypracticeServer> git pull origin master
git push
推送本地的更新到远程仓库,默认拉取的分支是绑定的远端分支(使用命令git branch -vv 查看关联情况)
可以使用 git push origin master 指定远程仓库的分支
PS D:SourceTreerepositorypracticeServer服务器托管网> git push
Everything up-to-date
PS D:SourceTreerepositorypracticeServer> git push origin master
Everything up-to-date
git branch -vv
查看本地分支与远程分支关联情况。
PS D:SourceTreerepositorypracticeServer> git branch -vv
* master 80126bc [origin/master]
git push –set-upstream origin master
将本地分支推送命令关联到远程分支
PS D:SourceTreerepositorypracticeServer> git push --set-upstream origin master
Everything up-to-date
branch 'master' set up to track 'origin/master'.
git pull –set-upstream origin dev
将本地分支拉取命令关联到远程分支
PS D:SourceTreerepositorypracticeServer> git pull --set-upstream origin master
* branch master -> FETCH_HEAD
Already up to date.
服务器托管,北京服务器托管,服务器租用 http://www.fwqtg.net
在 C# 中,& 和 && 都是逻辑与运算符,用于判断两个条件是否同时为真。 它们之间的区别如下: &: 会对两个条件进行求值,无论第一服务器托管网个条件的结果是 true 还是 false ,都会对第二个条件进行求值。 如果两…