从远程原点删除前10个分支(排除主控)

从远程原点删除前10个分支(排除主控)
.

0

linux命令:git branch -a | grep "remotes/origin" | grep -v master | sed 's/^[ *]*//' | sed 's/remotes\/origin\///' | head -n10 | sed 's/^/git push origin :/' | bash bash | :/' origin push 's/^/git sed | -n10 head | 's/remotes\/origin\///' sed | *]*//' 's/^[ sed | master -v grep | "remotes/origin" grep | -a branch git git branch -a | grep "remotes/origin" | grep -v master | sed 's/^[ *]*//' | sed 's/remotes\/origin\///' | head -n10 | sed 's/^/git push origin :/' | bashrootopen.com
linux命令:git branch -a | grep "remotes/origin" | grep -v master | sed 's/^[ *]*//' | sed 's/remotes\/origin\///' | head -n10 | sed 's/^/git push origin :/' | bash bash | :/' origin push 's/^/git sed | -n10 head | 's/remotes\/origin\///' sed | *]*//' 's/^[ sed | master -v grep | "remotes/origin" grep | -a branch git git branch -a | grep "remotes/origin" | grep -v master | sed 's/^[ *]*//' | sed 's/remotes\/origin\///' | head -n10 | sed 's/^/git push origin :/' | bashrootopen.com
glht 2018-05-17 00:06:48
输出

评论

相关推荐

linux命令:git branch --remotes --merged | grep -v master | sed 's@ origin/@:@' | xargs git push origin origin push git xargs | origin/@:@' 's@ sed | master -v grep | --merged --remotes branch git git branch --remotes --merged | grep -v master | sed 's@ origin/@:@' | xargs git push originrootopen.com
linux命令:git branch --remotes --merged | grep -v master | sed 's@ origin/@:@' | xargs git push origin origin push git xargs | origin/@:@' 's@ sed | master -v grep | --merged --remotes branch git git branch --remotes --merged | grep -v master | sed 's@ origin/@:@' | xargs git push originrootopen.com
.

linux命令:git log -p --name-only --follow <file> <file> --follow --name-only -p log git git log -p --name-only --follow <file>rootopen.com
linux命令:git log -p --name-only --follow <file> <file> --follow --name-only -p log git git log -p --name-only --follow <file>rootopen.com
.

该git archive命令基本上创建了一个tar文件,单行代码是创建一个目录,而不是中间的tar文件,上面的tar命令将解压缩git archive到使用该-C标志指定的目录中的输出。在运行此命令之前,该目录必须存在。

linux命令:git archive master | tar x -C /path/to/dir/to/export /path/to/dir/to/export -C x tar | master archive git git archive master | tar x -C /path/to/dir/to/exportrootopen.com
linux命令:git archive master | tar x -C /path/to/dir/to/export /path/to/dir/to/export -C x tar | master archive git git archive master | tar x -C /path/to/dir/to/exportrootopen.com
.

从远程git存储库复制更改的文件,包括二进制的one_,staged和unstaged等。请注意,此命令无法正确处理已删除的文件

linux命令:git diff --name-only HEAD | cpio -o -Hnewc --quiet | ssh HOST '(cd REPO_DIR && cpio -iduv --quiet -Hnewc)' -Hnewc)' --quiet -iduv cpio && REPO_DIR '(cd HOST ssh | --quiet -Hnewc -o cpio | HEAD --name-only diff git git diff --name-only HEAD | cpio -o -Hnewc --quiet | ssh HOST '(cd REPO_DIR && cpio -iduv --quiet -Hnewc)'rootopen.com
linux命令:git diff --name-only HEAD | cpio -o -Hnewc --quiet | ssh HOST '(cd REPO_DIR && cpio -iduv --quiet -Hnewc)' -Hnewc)' --quiet -iduv cpio && REPO_DIR '(cd HOST ssh | --quiet -Hnewc -o cpio | HEAD --name-only diff git git diff --name-only HEAD | cpio -o -Hnewc --quiet | ssh HOST '(cd REPO_DIR && cpio -iduv --quiet -Hnewc)'rootopen.com
.

使用这个来启动git守护进程,为一个路径下的所有git repos服务。

linux命令:git daemon --reuseaddr --verbose --export-all --base-path=/parent/of/bare/git/repos --base-path=/parent/of/bare/git/repos --export-all --verbose --reuseaddr daemon git git daemon --reuseaddr --verbose --export-all --base-path=/parent/of/bare/git/reposrootopen.com
linux命令:git daemon --reuseaddr --verbose --export-all --base-path=/parent/of/bare/git/repos --base-path=/parent/of/bare/git/repos --export-all --verbose --reuseaddr daemon git git daemon --reuseaddr --verbose --export-all --base-path=/parent/of/bare/git/reposrootopen.com
.

使用它来创建一个新的提交,“轻轻地”将分支恢复到某个提交(即将历史压缩为反向补丁)。您可以通过单独执行差异来首先查看更改。

linux命令:git diff HEAD..rev | git apply --index; git commit commit git --index; apply git | HEAD..rev diff git git diff HEAD..rev | git apply --index; git commitrootopen.com
linux命令:git diff HEAD..rev | git apply --index; git commit commit git --index; apply git | HEAD..rev diff git git diff HEAD..rev | git apply --index; git commitrootopen.com
.

linux命令:git svn --authors-file=some-authors-file clone svn://address/of/svn/repo new-git-dir new-git-dir svn://address/of/svn/repo clone --authors-file=some-authors-file svn git git svn --authors-file=some-authors-file clone svn://address/of/svn/repo new-git-dirrootopen.com
linux命令:git svn --authors-file=some-authors-file clone svn://address/of/svn/repo new-git-dir new-git-dir svn://address/of/svn/repo clone --authors-file=some-authors-file svn git git svn --authors-file=some-authors-file clone svn://address/of/svn/repo new-git-dirrootopen.com
.

快速查找分支机构提交id以用于git cherry-pick时很有用。

linux命令:git log master | awk '/commit/ {id=$2} /\s+\w+/ {print id, $0}' $0}' id, {print /\s+\w+/ {id=$2} '/commit/ awk | master log git git log master | awk '/commit/ {id=$2} /\s+\w+/ {print id, $0}'rootopen.com
linux命令:git log master | awk '/commit/ {id=$2} /\s+\w+/ {print id, $0}' $0}' id, {print /\s+\w+/ {id=$2} '/commit/ awk | master log git git log master | awk '/commit/ {id=$2} /\s+\w+/ {print id, $0}'rootopen.com
.

将做合并,但只对工作副本和索引进行更改;不会提交。

linux命令:git merge --no-commit --no-ff --no-ff --no-commit merge git git merge --no-commit --no-ffrootopen.com
linux命令:git merge --no-commit --no-ff --no-ff --no-commit merge git git merge --no-commit --no-ffrootopen.com
.

commit合并时,使用的共同 base,(SHA1).http://www.kernel.org/pub/software/scm/git/docs/git-merge-base.html

linux命令:git merge-base branch1 branch2 branch2 branch1 merge-base git git merge-base branch1 branch2rootopen.com
linux命令:git merge-base branch1 branch2 branch2 branch1 merge-base git git merge-base branch1 branch2rootopen.com
.

linux命令:git add -u -u add git git add -urootopen.com
linux命令:git add -u -u add git git add -urootopen.com
.

这个命令将首先添加一个只有git已知的别名,这将允许你拉远程并且首先转发当前分支。但是,如果远程/分支和分支已经发生分歧,在实际尝试合并两者之前它将停止,因此您可以退出更改.http://www.kernel.org/pub/software/scm/git/ docs / git-pull.html在git 1.5.6.1,msysgit(Windows端口)上测试其实这并不是我想要的方式。我希望它尝试快速前进,但不要尝试合并或更改我的工作副本。不幸的是,git pull没有这个功能(但?)。

linux命令:git config --global --add alias.ff "pull --no-commit -v" ; git ff ff git ; -v" --no-commit "pull alias.ff --add --global config git git config --global --add alias.ff "pull --no-commit -v" ; git ffrootopen.com
linux命令:git config --global --add alias.ff "pull --no-commit -v" ; git ff ff git ; -v" --no-commit "pull alias.ff --add --global config git git config --global --add alias.ff "pull --no-commit -v" ; git ffrootopen.com
.

这个命令将git日志的oputut限制为每个提交一行和一个缩写的提交ID。

linux命令:git config --global alias.log1 "log --pretty=oneline --abbrev-commit" --abbrev-commit" --pretty=oneline "log alias.log1 --global config git git config --global alias.log1 "log --pretty=oneline --abbrev-commit"rootopen.com
linux命令:git config --global alias.log1 "log --pretty=oneline --abbrev-commit" --abbrev-commit" --pretty=oneline "log alias.log1 --global config git git config --global alias.log1 "log --pretty=oneline --abbrev-commit"rootopen.com
.

linux命令:git diff --cached --cached diff git git diff --cachedrootopen.com
linux命令:git diff --cached --cached diff git git diff --cachedrootopen.com
.

这个命令处理你已经删除的git rm'ing文件。

linux命令:git rm $(git ls-files --deleted) --deleted) ls-files $(git rm git git rm $(git ls-files --deleted)rootopen.com
linux命令:git rm $(git ls-files --deleted) --deleted) ls-files $(git rm git git rm $(git ls-files --deleted)rootopen.com
.

忘记提交文件很常见,不管是修改还是全新的文件。如果你忘记了一些东西,git添加你想要的文件,然后git commit --amend。它将基本上重做上次提交,并添加刚刚添加的更改。它在默认情况下使用最后一个提交消息对提交消息进行种子处理。如果您已经推送提交,则可能不应该这样做。

linux命令:git commit --amend --amend commit git git commit --amendrootopen.com
linux命令:git commit --amend --amend commit git git commit --amendrootopen.com
.

假设你在一个git仓库中工作,你可以运行上面的命令并查看反向时间顺序的变化,每行一次提交。 'oneline'的其他格式变体包括'short','medium','full','full','email'或'raw'。

linux命令:git log --pretty=oneline --pretty=oneline log git git log --pretty=onelinerootopen.com
linux命令:git log --pretty=oneline --pretty=oneline log git git log --pretty=onelinerootopen.com
.

linux命令:git grep -l "your grep string" | xargs gedit gedit xargs | string" grep "your -l grep git git grep -l "your grep string" | xargs geditrootopen.com
linux命令:git grep -l "your grep string" | xargs gedit gedit xargs | string" grep "your -l grep git git grep -l "your grep string" | xargs geditrootopen.com
.

我已经使用过很多技术挑战命令,但是这个命令处理文件名中的空格。我相信你想为它创建一个别名:)

linux命令:git ls-files -z --deleted | xargs -0 git rm rm git -0 xargs | --deleted -z ls-files git git ls-files -z --deleted | xargs -0 git rmrootopen.com
linux命令:git ls-files -z --deleted | xargs -0 git rm rm git -0 xargs | --deleted -z ls-files git git ls-files -z --deleted | xargs -0 git rmrootopen.com
.

linux命令:git --no-pager whatchanged -1 --pretty=medium <commit_hash> <commit_hash> --pretty=medium -1 whatchanged --no-pager git git --no-pager whatchanged -1 --pretty=medium <commit_hash>rootopen.com
linux命令:git --no-pager whatchanged -1 --pretty=medium <commit_hash> <commit_hash> --pretty=medium -1 whatchanged --no-pager git git --no-pager whatchanged -1 --pretty=medium <commit_hash>rootopen.com
.
共收录0条命令行
这里是记录和分享命令行的地方, 所有命令行都可以进行评论、提交替代方案.

推荐
    热门命令