相关疑难解决方法(0)

如何删除已合并的所有Git分支?

我有很多Git分支.如何删除已合并的分支?是否有一种简单的方法可以删除它们而不是逐个删除它们?

git version-control branch github feature-branch

1782
推荐指数
30
解决办法
50万
查看次数

"下游"和"上游"的定义

我已经开始玩Git并遇到过"上游"和"下游"这两个词.我之前见过这些,但从未完全理解它们.这些术语在SCM(软件配置管理工具)和源代码的上下文中意味着什么?

versioning git version-control terminology definition

869
推荐指数
6
解决办法
26万
查看次数

从原点拉出所有分支

我可以这样说:

git push --all origin
Run Code Online (Sandbox Code Playgroud)

它会将所有分支推向原点.但如果我这样做:

git pull --all origin
Run Code Online (Sandbox Code Playgroud)

然后它不会原点拉出所有分支,它只返回一个错误:

fatal: fetch --all does not take a repository argument
Run Code Online (Sandbox Code Playgroud)

好的,我这样做:

git pull --all
Run Code Online (Sandbox Code Playgroud)

买还是说:

You asked to pull from the remote '--all', but did not specify
a branch. Because this is not the default configured remote
for your current branch, you must specify a branch on the command line.
Run Code Online (Sandbox Code Playgroud)

那么如何从原点拉出所有分支(就像我所有分支送到原点git push --all origin)?

git

7
推荐指数
2
解决办法
3558
查看次数

删除远程分支

当我表演时branch -a:

$ git branch -a
* master
 remotes/origin/HEAD -> origin/master
 remotes/origin/hello
 remotes/origin/master
Run Code Online (Sandbox Code Playgroud)

然后我删除了分支:

$ git branch -r -D origin/hello
Deleted remote branch origin/hello (was c0cbfd0).
Run Code Online (Sandbox Code Playgroud)

现在我明白了:

$ git branch -a
* master
 remotes/origin/HEAD -> origin/master
 remotes/origin/master
Run Code Online (Sandbox Code Playgroud)

分支"你好"已被删除.但是当我拿到:

$ git fetch
From localhost:project
 * [new hello]      hello     -> origin/hello

$ git branch -a
* master
 remotes/origin/HEAD -> origin/master
 remotes/origin/hello
 remotes/origin/master
Run Code Online (Sandbox Code Playgroud)

我很困惑.
我认为它已被删除,但它仍然存在.

git branch

5
推荐指数
1
解决办法
243
查看次数