同步本地文件到github回购 [英] syncing local file to github repo

查看:234
本文介绍了同步本地文件到github回购的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

初学者问题/问题。我使用Git将文件提交到Github上的回购站,并使用git show来确认它已成功,但我无法在GitHub上看到该文件。这是为什么?是否有任何简单的说明将文件同步到GitHub,我可以使用它来验证或指示它被推送到GitHub?

解决方案


我使用Git将文件提交到Github上的repo中


您不直接将文件直接提交到GitHub上的repo,您​​在本地克隆中进行提交,然后将这些提交推送到远程存储库,在这种情况下,GitHub 。


...使用git show确认它已成功


git show 不会告诉你push是否成功,它只显示最后一次提交的内容。


我无法在GitHub上看到该文件。为什么会这样?


您是否做过 git push


将文件同步到GitHub的简单说明


你不用git同步文件,你使用提交。您可以使用 git push 将本地提交推送到远程, git pull 或 git fetch




验证或表明它已被推送到GitHub?

git push 的输出告诉你push是否成功。

Beginner question/problem. I used Git to commit a file to a repo on Github and used git show to confirm that it had been successful, but I'm unable to see the file on GitHub. Why is that? Are there any simple instructions for syncing up a file to GitHub that I could use to verify or indicate that it was pushed to GitHub?

解决方案

I used Git to commit a file to a repo on Github

You don't commit files directly to a repo on GitHub, you make commits in your local clone and then push those commits to remote repository, in this case GitHub.

... used git show to confirm that it had been successful

git show does not tell you if the push has been successful or not, it just shows the contents of the last commit.

I'm unable to see the file on GitHub. Why is that?

Did you do a git push?

simple instructions for syncing up a file to GitHub

You don't sync files with git, you work with commits. You use git push to push local commits to a remote, and git pull or git fetch to get commits from a remote to your local repo.

verify or indicate that it was pushed to GitHub?

The output of git push tells you if the push succeeded or not.

这篇关于同步本地文件到github回购的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆