提交Java文件更新到git

时间:2013-07-24 20:24:22

标签: git github

我是git和stackoverflow的新手 我在git上更新我的.java文件时遇到问题。必须遗漏一些小事。  你能帮我吗。输出低于?

bash-3.2$ git add bwt.java
bash-3.2$ git commit -m "new commit"
[master (root-commit) fc94e26] new commit
 1 file changed, 368 insertions(+)
 create mode 100755 src/bwtx/bwt.java
bash-3.2$ git remote add origin
usage: git remote add [<options>] <name> <url>

    -f, --fetch           fetch the remote branches
    --tags                import all tags and associated objects when fetching
                          or do not fetch any tag at all (--no-tags)
    -t, --track <branch>  branch(es) to track
    -m, --master <branch>
                          master branch
    --mirror[=<push|fetch>]
                          set up remote as a mirror to push to or fetch from

bash-3.2$ git remote add origin https://github.com/MartinRSchiller/BWT.git
bash-3.2$ git remote add origin 
usage: git remote add [<options>] <name> <url>

    -f, --fetch           fetch the remote branches
    --tags                import all tags and associated objects when fetching
                          or do not fetch any tag at all (--no-tags)
    -t, --track <branch>  branch(es) to track
    -m, --master <branch>
                          master branch
    --mirror[=<push|fetch>]
                          set up remote as a mirror to push to or fetch from

1 个答案:

答案 0 :(得分:3)

看起来您已成功添加远程原点。你应该发出:

git push -u origin master

I recommend looking at steps 1,2, and 3 in this github guide.