git上传中的排除的配置文件, git实际的操作代码;

时间:2023-03-09 15:39:08
git上传中的排除的配置文件, git实际的操作代码;

git上传中的排除的配置文件:

git实际的操作
在主目录建立.gitignore文件并输入以下保存:
*.class

#package file
*.war
*.ear #kdiff3 ignore
*.orig #maven ignore
target/ #eclipese ignore
.settings/
.project
.classpatch #idea
.idea/
/idea/
*.ipr
*.iml
*.iws #temp file *.log
*.cache
*.diff
*.patch
*.tmp #system ignore .DS_Store
Thumbs.db
1:执行初始化
git init
2:查看状态
git status
3:上传本地并加注释
git commit -am "注释"
4:复制git的地址
git remote add origin
6:拉取文件
git pull
7:推送远程仓库
git push -u origin master
8:强制推送(覆盖掉)
git push -u -f origin master
9:查看本地分支;
git branch
10: 查看远程的分支名字
git branch -r
11:推送分支到git
git checkout -b name 远程分支名字
12:再查看一下分支 ,并提交到远程
git checkout
git push origin HEAD -u