git配置

git配置

 登入码云

 

 新建一个上传的项目 

配置tomcat 

启动访问8080

 

 配置termial

 

 

新增两个文件

 忽略 gitignore文件内容

*.class

#package file
*.war
*.ear

#kdiff3 ignore
*.orig

#maven ignore
target/

#eclipse ignore
.settings/
.project
.classpath

#idea
.idea/
/idea/
*.ipr
*.iml
*.iws

# time file

*.log
*.cache
*.diff
*.path
*.tmp

 git 常用的一些指令

$ git init

$ git status  可以看到那些文件发生变化

$  git add .  添加进来 

$ git status  查看 添加进来

$ git commit -am  'first commit init project'

$ git config --global user.email "you@example.com"

$ git config --global user.name "Your Name"

 

$ git remote add origin git@git.oschina.net:hudj/mmall_learning.git

$ git branch 查看分支

github帐号添加SSH keys

$ ssh-keygen

/c/Users/Administrator/.ssh/id_rsa 找到盘下复制

push

 

Git pull

Git push -u origin master

Git push -u -f origin master

 

$ git  checkout -b v1.0 origin/master

创建分支

$ git push origin HEAD -u

推送分支

查看分支

原文地址:https://www.cnblogs.com/hudj/p/7464439.html