git操作
git 操作: git init git clone git pull origin branch_name(更新本地仓库) 修改本地仓库 git status git diff git add filename git config --global user.name "gitlab" git config --global user.email "xxx@yy.com" git commit -m "description" git status git log git push origin branch_name(将本地分支push到远程分支) git branch(查看本地分支) git branch -a (查看远程所有分支) git checkout -b dev origin/dev(创建并切换分支branchname=dev) git branch branch_name (创建本地分支) git branch -d branch_name(删除本地分支) git checkout branchname(切换本地分支) git push origin --delete branch_name(删除远程分支) git branch -n oldname newname(重命名本地分支) git remote add origin git@gitlab.uu.ai:xxx/pytorch_semantic_segmentation.git(关联远程仓库) git checkout commit_id(回退到指定版本) git rebase -i (commit-id) (commit-id 为需要删除版本的前一个commit版本的hash code,然后pick->drop)
git configuration
git global setup: git config --global user.name "xxx" git config --global user.email "xxx@uu.com" create a new repository git clone git@gitlab.uu.ai:xxx/pytorch_semantic_segmentation.git cd pytorch_semantic_segmentation touch README.md git add README.md git commit -m "add README" git push -u origin master existing folder cd existing_folder git init git remote add origin git@gitlab.uu.ai:xxx/pytorch_semantic_segmentation.git git add . git commit -m "Initial commit" git push -u origin master existing git repository cd existing_repo git remote add origin git@gitlab.uu.ai:xxx/pytorch_semantic_segmentation.git git push -u origin --all git push -u origin --tags
完