如何将SpringJava项目上传到GitHub,以便显示我的工作?

如何将SpringJava项目上传到GitHub,以便显示我的工作?,spring,github,Spring,Github,我尝试过各种方法,直接上传文件是行不通的。我试过bash,什么也没试过。你安装了git吗 # Create a new repository on the command line #Go to Project Directory on your Computer, Open git Bash here # run the following 1 by 1 git init git add . git commit -m "Comment here" git r

我尝试过各种方法,直接上传文件是行不通的。我试过bash,什么也没试过。

你安装了git吗

# Create a new repository on the command line

#Go to Project Directory on your Computer, Open git Bash here

# run the following 1 by 1 

git init

git add .

git commit -m "Comment here"

git remote add origin https://github.com/YourRepoPrefixHere

git push -u origin master

如果您有git配置文件和存储库,您可以采取以下简单步骤将其联机:

  • 打开终端,进入要推送到git存储库的项目文件夹
  • 检查您是否在正确的git分支上:git checkout
  • git添加。
  • git commit-m“您要提交的消息”
  • git推送原点-u“yourbranchName
  • 如果从未设置过源分支,则应在使用它之前添加它:

    git远程添加源“github链接”

    要查看一切是否顺利,您可以执行一个简单的操作:git status


    我希望它对你有用,我的朋友!

    确保你从这里下载了git