git使用

阅读更多
git将已经存在的目录添加到远程的版本库命令
http://git.XX.com/aroundair/air-insurance
Existing folder or Git repository

cd existing_folder
git init
git remote add origin [email protected]:aroundair/air-insurance.git
git add .
git commit
git push -u origin master

git在linux上使用
//配置ssh,在本地生成ssh的pub,放到git的服务器上
ssh-keygen -t rsa -C "GitLab" -b 4096
在git服务上克隆某个分支的代码
git clone -b 分支1 //clone某个分支
git branch -a //所有分支
git branch //当前分支
git pull origin 分支 //fetch menge


有了项目有需要执行打包,排除test和选择profile
mvn clean package -Dmaven.test.skip=true -Pdevelopment


切换分支
git checkout 分支

menge分支
git merge origin/分支


在使用时候遇到的问题
1.linux遇到http406:添加到.netrc配置
machine source.xx.com
login Janle
password Janle88888

你可能感兴趣的:(git)