# 情况1,本地无仓库 echo "# RepositoryTest" >> README.md git init git add README.md git commit -m "first commit" git branch -M main git remote add origin git@github.com:wenjtop/RepositoryTest.git git push -u origin main # 情况2,本地有仓库 git remote add origin git@github.com:...
New Branch : 从当前分支新建分支。上图就是从master分支创建新的分支。 Checkout Tag or Revision : 使用分支、标签或提交编码,检出一个临时分支。 Local Branches : 本地分支列表。同时显示对应了那个远程分支。 Remote Branches : 远程分支列表。 本地分支菜单 Checkout : 检出这个分支。 Checkout As... : ...
git branch; 看本地当前分支( local branches)情况,以及当前工作区位于哪个分支。 git branch -r看远程跟踪分支(remote-tracking branches)情况,--remotes。 git branch -d <branch>;删除 <branch>,--delete; git branch -a;查看本地和远程所有分支情况,--all; git branch -m <new-branch-name>:修改当前分...
pull Fetch from and integrate with another repository or a local branch push Update remote refs along with associated objects 'git help -a' and 'git help -g' list available subcommands and some concept guides. See 'git help ' or 'git help <concept>' to read about a specific subcommand ...
You can also see at the left bottom of your Visual Studio Code application, that you're using themasterbranch. Theinitcommand automatically generates a master branch in your local Git repository. All files that will be committed to the Git directory will now be committed on the master branch...
资源库(Repository或Git Directory) // commit 克隆 git clone http://***.git // 从远程仓库克隆代码到版本库(本地仓库) 查看分支 // local: git branch // remote: git branch -r // all: git branch -a 切换分支 git checkout -b dev origin/dev // 拉取远程分支到本地 git checkout dev...
git branch -d 删除一个本地分支(Delete a local branch) git branch origin --delete 删除一个远程分支(Delete a remote branch) git push : 重命名远程分支名(Rename a branch on remote)git push git push git tag 给当前提交打一个tag,也可以查看当前标签(Tag the current commit) Update & Publish(...
Create, list, delete or verify a tag object signed with GPG collaborate (see also: git help workflows) fetch Download objects and refs from another repository pull Fetch from and integrate with another repository or a local branch push Update remote refs along with associated objects 'git help ...
1、创建新分支 选择git->Repository->Branchers->New Branch 2、输入分支名称“开发分支”,分支创建完成。 3、当前分支查询 创建完成后注意IDEA的右下角,如下图,Git: 开发分支表示已经自动切换到开发分支,当前工作在这个分支上。 4、切换分支 点击后弹出一个小窗口,在Local Branches中有其他可用的本地分支选项,点...
fatal: Could not read from remote repository. 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 解决办法: chmod 600 ~/.ssh/id_rsa ~/.ssh/id_rsa.pub 1. 2.4 工程命令 git branch 查看本地所有分支,标(*)的是当前分支。git branch -a 查看远端所有分支。