git經常使用操做

1、git的配置文件git

在config文件中添加spring

[user]
    email = kero@qq.com
    name = kero

2、.gitignoreapp

/target/
.mvn/wrapper/maven-wrapper.jar

### STS ###
.apt_generated
.classpath
.factorypath
.project
.settings
.springBeans
.sts4-cache

### IntelliJ IDEA ###
.idea
*.iws
*.iml
*.ipr

### NetBeans ###
/nbproject/private/
/build/
/nbbuild/
/dist/
/nbdist/
/.nb-gradle/
View Code

3、命令maven

1.git branch -a 查看遠程全部分支ide

2.git branch 查看本地分支gradle

3.git checkout -b 本地分支名 origin/遠程分支名     表示:將遠程git倉庫裏的指定分支拉取到本地(本地不存在的分支)ui

 

4.git status查看idea

5.git pull origin 分支名spa

6.git push origin 分支名code

 

 

7.合併fromdevelop分支到develop分支上:首先切換到develop分支,再執行: git merge fromdevelop

 8.git push origin :fromdevelop   //刪除遠程fromdevelop分支

git push origin test:master         // 提交本地test分支做爲遠程的master分支

git push origin test:test              // 提交本地test分支做爲遠程的test分支

git branch -d <BranchName>      // 刪除本地分支 

 

9.git add -f  文件  強制把文件加到git追蹤管理

 

 

10.永久存儲帳號和密碼

git config --global credential.helper store
相關文章
相關標籤/搜索