Fork me on GitHub

git 提交代码到码云

1.打开项目,在项目中指向git init 初始化git仓库

2.把下面.gitignore这个文件复制到项目根目录下面,为了忽略不必要上穿的文件

node_modules
/unpackage

# local env files
.env.local
.env.*.local

# Log files
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Editor directories and files
.idea
.vscode
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?

3.git remote add origin git地址  连接远程仓库,并提交本地暂存代码
4..强制推送分支git push -u origin master --force

posted @ 2020-04-27 17:56  欢欢11  阅读(182)  评论(0编辑  收藏  举报