Git常见命令
git clone
git pull [origin] [别的分支名]
git add . [文件名]
git status
git rm 文件名.后缀
git reset 文件名.后缀
git commit -m "xxxx"
git push
git log
分支常见命令
git branch
git branch -r
git branch -a
git checkout -b wwybranch
git branch wwybranch
git checkout wwybranch
git push origin wwybranch
git push --set-upstream origin wwybranch
git pull origin/master
git checkout master
git merger wwybranch
git branch -d wwybranch
git push origin -d wwybranch
标签
git tag
git show [tag]
git tag [标签名]
git push origin v1.0
git checkout -b [branch] [tag]
git tag -d [tag]
git push origin :refs/tags/[tag]
忽略文件
在工作空间创建文件夹.gitignore
# 排除所有.开头的隐藏文件:
.*
# 排除所有.class文件:
*.class
# 不排除.gitignore和Application.class:
!.gitignore
!Application.class
# 忽略target文件夹下的所有文件
target
# 忽略src/main/resources文件夹下的所有yml文件
src/main/resources/*.yml
|