配置 git git多源提交代码

vi ~/.gitconfig

[alias]
st = status
ci = commit
ci-a = commit -a
pr = pull --rebase
co = checkout
br = branch
ll = log --pretty=format:"%C(yellow)%h%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --numstat
ld = log --pretty=format:"%C(yellow)%h\\ %C(green)%ad%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --date=short --graph
ls = log --pretty=format:"%C(green)%h\\ %C(yellow)[%ad]%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --date=relative
lg = log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit
sw = switch
c-p = cherry-pick

[credential]
helper = store

 

git 多源提交:

git remote add new git地址

git push origin main #提交到原来的ip地址的git

git push new 分支 #提交的新的git 

 

删除旧的git地址时

git remote rm origin   删除默认git地址
git remote rm new     删除new的git地址

posted @ 2023-03-23 10:53  国服第一李师师  阅读(54)  评论(0编辑  收藏  举报