GitHub Commands
git 常用命令
#Create a file and put it under version control
git add . && git commit -m "release 1.2.11"
#If you do not label a repository it will push to origin
git push -u origin master
注册 SSH key
- 以便git bash 可以push request local src to github by ssh
- .git/config 配置 ,注意
url
一项
[core]
repositoryformatversion = 0
filemode = false
bare = false
logallrefupdates = true
symlinks = false
ignorecase = true
hideDotFiles = dotGitOnly
[remote "origin"]
url = git@github.com:JeffenCheung/jeesite-common.git
fetch = +refs/heads/*:refs/remotes/origin/*
[branch "master"]
remote = origin
merge = refs/heads/master
- clone with ssh / https , via. Pactera-Jeesite-1.2.11
#clone with ssh (Recommend)
git clone git@github.com:JeffenCheung/aggregator.git
git clone git@github.com:JeffenCheung/jeesite-common.git
git clone git@github.com:JeffenCheung/jeesite-cms.git
git clone git@github.com:JeffenCheung/jeesite-gen.git
git clone git@github.com:JeffenCheung/jeesite-oa.git
git clone git@github.com:JeffenCheung/jeesite-oa-core.git
git clone git@github.com:JeffenCheung/jeesite-soa.git
git clone git@github.com:JeffenCheung/jeesite-web.git
git clone git@github.com:JeffenCheung/jeesite-web-dist.git
git clone git@github.com:JeffenCheung/jeesite-spider.git
git clone git@github.com:JeffenCheung/pactera-crm.git
git clone git@github.com:JeffenCheung/pactera-sms.git
#
#clone with https (Not recommend)
git clone https://github.com/JeffenCheung/aggregator.git
git clone https://github.com/JeffenCheung/jeesite-common.git
git clone https://github.com/JeffenCheung/jeesite-cms.git
git clone https://github.com/JeffenCheung/jeesite-gen.git
git clone https://github.com/JeffenCheung/jeesite-oa.git
git clone https://github.com/JeffenCheung/jeesite-oa-core.git
git clone https://github.com/JeffenCheung/jeesite-soa.git
git clone https://github.com/JeffenCheung/jeesite-web.git
git clone https://github.com/JeffenCheung/jeesite-web-dist.git
git clone https://github.com/JeffenCheung/jeesite-spider.git
git clone https://github.com/JeffenCheung/pactera-crm.git
git clone https://github.com/JeffenCheung/pactera-sms.git
alias 别名
- 通过全局配置 .gitconfig 里的
alias
可快速调用执行一段bath - 通过类似
$git rg-gen
来调用执行
[alias]
rg = release model project to github.
in = ignore files to github.
in-svn = !git rm -r --cached *.svn*
in-st = !git rm -r --cached .settings
in-target = !git rm -r --cached target/
in-cp = !git rm -r --cached .classpath
in-pj = !git rm -r --cached .project
in-md = !git rm -r --cached .mymetadata
in-c = !git rm -r --cached src/main/webapp/WEB-INF/classes/
rg-aggregator = !cd e:/workspace_jeesite/aggregator && git add . && git commit -m 'release 1.2.11-SNAPSHOT' && git push -u origin master
rg-common = !cd e:/workspace_jeesite/jeesite-common && git add . && git commit -m 'release 1.2.11-SNAPSHOT' && git push -u origin master
rg-cms = !cd e:/workspace_jeesite/jeesite-cms && git add . && git commit -m 'release 1.2.11-SNAPSHOT' && git push -u origin master
rg-gen = !cd e:/workspace_jeesite/jeesite-gen && git add . && git commit -m 'release 1.2.11-SNAPSHOT' && git push -u origin master
rg-oa = !cd e:/workspace_jeesite/jeesite-oa && git add . && git commit -m 'release 1.2.11-SNAPSHOT' && git push -u origin master
rg-oa-core = !cd e:/workspace_jeesite/jeesite-oa-core && git add . && git commit -m 'release 1.2.11-SNAPSHOT' && git push -u origin master
rg-soa = !cd e:/workspace_jeesite/jeesite-soa && git add . && git commit -m 'release 1.2.11-SNAPSHOT' && git push -u origin master
rg-web = !cd e:/workspace_jeesite/jeesite-web && git add . && git commit -m 'release 1.2.11-SNAPSHOT' && git push -u origin master
rg-web-dist = !cd e:/workspace_jeesite/jeesite-web-dist && git add . && git commit -m 'release 1.2.11-SNAPSHOT' && git push -u origin master
rg-crm = !cd e:/workspace_jeesite/pactera-crm && git add . && git commit -m 'release 1.2.11-SNAPSHO' && git push -u origin master
rg-sms = !cd e:/workspace_jeesite/pactera-sms && git add . && git commit -m 'release 1.2.11-SNAPSHO' && git push -u origin master
rp-note = !cd D:/andorid/dep_res/code/jeffen_note && git add . && git commit -m 'released.' && git push -u origin master