We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
git remote 查看链接的远程分支,origin即是远程的master分支 git branch 列出本地分支 git branch -a (git branch --all的缩写) 列出所有分支,包括本地和远程分支 git checkout -b 本地分支名称(比如:dev) 远程分支名称(比如:origin/dev) 作用是远程分支切换到origin/dev,并在本地创建dev分支,并切换到的本地dev分支 例子:git checkout -b dev origin/dev
create a new repository on the command line echo "# test" >> README.md git init git add README.md git commit -m "first commit" git remote add origin https://github.com/yourgithubname/xxx.git(仓库地址) git push -u origin master
直接 git push -u origin branchname;可以把本地的当前分支push到远程仓库的branchname分支,如果没有branchname分支则会自动新建一个远程分支branchname,并push
push an existing repository from the command line git remote add origin https://github.com/yourgithubname/xxx.git(仓库地址) git push -u origin master
The text was updated successfully, but these errors were encountered:
No branches or pull requests
git remote
查看链接的远程分支,origin即是远程的master分支
git branch
列出本地分支
git branch -a (git branch --all的缩写)
列出所有分支,包括本地和远程分支
git checkout -b 本地分支名称(比如:dev) 远程分支名称(比如:origin/dev)
作用是远程分支切换到origin/dev,并在本地创建dev分支,并切换到的本地dev分支
例子:git checkout -b dev origin/dev
create a new repository on the command line
echo "# test" >> README.md
git init
git add README.md
git commit -m "first commit"
git remote add origin https://github.com/yourgithubname/xxx.git(仓库地址)
git push -u origin master
直接 git push -u origin branchname;可以把本地的当前分支push到远程仓库的branchname分支,如果没有branchname分支则会自动新建一个远程分支branchname,并push
push an existing repository from the command line
git remote add origin https://github.com/yourgithubname/xxx.git(仓库地址)
git push -u origin master
The text was updated successfully, but these errors were encountered: