在github官网创建项目
进入eureka项目目录
3. 创建README
touch README
4. 创建.gitignore
*.class
#package files
*.war
*.ear
#kdiff3 ignore
target/
eurekaserver/target/
eurekaclient/target/
#eclipse ignore
.settings/
.project
.classpath
#idea
.idea/
/idea/
*.ipr
*.iml
*.iws
# temp file
*.log
*.cache
*.diff
*.patch
*.tmp
初始化为git版本控制
git init
查看文件状态
git status
添加变更文件
git add .
提交到本地仓库
git commit -m "eureka project first submit"
链接远程仓库
git remote add origin https://github.com/${account}/eureka.git
远程pull到本地
git pull origin master
push到远程仓库
git push -u origin master
#强制push的方法 以本地为主
git push -u origin master -f