GitHub - Unsynchronized Commit?

前端 未结 3 769
遇见更好的自我
遇见更好的自我 2021-01-01 23:47

I made a bunch of changes to files in a git repository. Before I committed anything I was asked to commit some other files someone else had for me (coming from an SVN reposi

相关标签:
3条回答
  • 2021-01-02 00:26

    In the GitHub for Mac GUI client, go to Repository > Push on the menubar.

    This will upload any unsynced commits to the GitHub server. Since this does not download any new code, the GitHub client will not force you to commit all your changes. This is useful if you have a bunch of local changes that are not ready to commit, but you also have several local changes that are ready to commit.

    This seems easier than (although conceptually equivalent to) the previous suggested answers involving the git command-line interface.

    0 讨论(0)
  • 2021-01-02 00:28

    I don't know if the GitHub app provides this functionality (though I would kind of expect it to), but git has a function called "git stash" which takes all your uncommitted changes and stashes them away in a special place. This leaves you with a pristine working copy (without those changes), where you can do whatever you need to, and then use git stash pop (or git stash apply) to reapply your uncommitted changes. I encourage you to read the manpage.

    0 讨论(0)
  • 2021-01-02 00:50

    Thought the following discussion

    Committing Files Back to GitHub for Windows

    may help readers of this question.

    0 讨论(0)
提交回复
热议问题