打开git bash进入项目目录:

git提交代码到github上


然后将不需要提交的文件进行忽略:

touch .gitignore  创建.gitignore文件

在文件中把不需要的文件名或者文件输入进去

git提交代码到github上


接下来添加.gitignore文件中以外的文件

git add .

可以查看提交状态

git status


然后提交代码

git commit -m '输入提交内容'


然后将提交内容和远程仓库同步:后面为git仓库的地址

git remote add origin https://github.com/qblank/SpringSecurity.git

最后提交

git push -u origin master

此时需要添加github的用户名以及密码:

git提交代码到github上

这样就完成提交了

我们刷新下对应的github仓库的页面

git提交代码到github上



相关文章:

  • 2021-09-18
  • 2021-11-30
  • 2021-04-18
  • 2022-12-23
  • 2021-11-28
  • 2021-06-27
  • 2022-01-02
  • 2021-08-04
猜你喜欢
  • 2022-02-01
  • 2022-01-29
  • 2021-11-25
  • 2021-04-29
  • 2021-04-07
  • 2021-08-29
  • 2021-10-11
相关资源
相似解决方案