git clone git@code.sangfor.org:test/ATT/EP/cp/at_os_topology.git -b feature-docker-af
git checkout -b feature-zmy-debug origin/eature-docker-af
git reset --hard
git pull origin -p(拉取全部分支的所有代码)
git push origin feature-zmy-debug:feature-zmy-no-zone
[root@aft ruby]# git branch
* feature-8025-att2-merge-zmy
svn/feature-sync-8025
[root@aft ruby]# git branch -a
* feature-8025-att2-merge-zmy
svn/feature-sync-8025
remotes/origin/HEAD -> origin/master
remotes/origin/ci/af8040-smoke
remotes/origin/develop
remotes/origin/feature-8025-att2-merge-zmy
remotes/origin/feature-wxh-adapter
remotes/origin/master
remotes/origin/svn/feature-sync-8025
[root@aft ruby]# git branch -d svn/feature-sync-8025
warning: deleting branch ‘svn/feature-sync-8025‘ that has been merged to
‘refs/remotes/origin/svn/feature-sync-8025‘, but not yet merged to HEAD.
Deleted branch svn/feature-sync-8025 (was 03fc631).
# delete branch locally
git branch -d localBranchName
# delete branch remotely
git push origin --delete remoteBranchName
git log --oneline --graph #确认最新的提交是自己刚刚的commit 信息
git rebase --abort
When you have resolved this problem, run "git rebase --continue".
If you prefer to skip this patch, run "git rebase --skip" instead.
To check out the original branch and stop rebasing, run "git rebase --abort".
中文路径乱码
git config --global core.quotepath false
颜色高亮
git config --global color.status auto
git config --global color.diff auto
git config --global color.branch auto
git config --global color.interactive auto
合并A分支的ab文件到分支
branch A 分支上有 a、b 、c、d、e 这 5 个文件与 branch B 分支不同,现在我们只想从 A 到 B 合并 a、b 两个文件:
git checkout B // 首先切换到 B 分支
git checktou A a b // 然后从 A 中抽取 a、b 两个选定的文件
原文:https://www.cnblogs.com/bailiqi007/p/12905714.html