git 如何使用 GitHub Desktop“提交”对 GitHub 的更改
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/27211578/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to "Commit" changes to GitHub with GitHub Desktop
提问by M Arfan
I have recently downloaded GitHub Desktop and clone a repository. I am trying to upload new project files in it by GitHub Desktop. How do I go about doing this?
我最近下载了 GitHub Desktop 并克隆了一个存储库。我正在尝试通过 GitHub Desktop 在其中上传新的项目文件。我该怎么做?
回答by Gajendra D Ambi
Okay, I too had the same problem and i figured it out. Make whatever the changes that you want to make in your local repository. open github desktop app.
好吧,我也有同样的问题,我想通了。进行您想要在本地存储库中进行的任何更改。打开 github 桌面应用程序。
click on the repository at the left hand pane.
单击左侧窗格中的存储库。
On the top you will see a drop down menu (by default set to master in my case), change it if you so desire or leave it the way it is.
在顶部,您会看到一个下拉菜单(在我的情况下默认设置为 master),如果您愿意,可以更改它或保持原样。
click on the changes tab.
单击更改选项卡。
type something in the summary section.
在摘要部分键入一些内容。
type something in the description section.
在描述部分输入一些内容。
The commit to master gets highlighted. Click on it and it will commit to the master on your desktop app.
对 master 的提交被突出显示。单击它,它将提交给您桌面应用程序上的 master。
Now click on sync on the top right corner of your github desktop app and it will sync to the online repository.
现在单击 github 桌面应用程序右上角的同步,它将同步到在线存储库。
回答by zanderwar
You must first create the repository within GitHub,
您必须首先在 GitHub 中创建存储库,
Then you open GitHub Desktop
然后你打开GitHub桌面
- Click the New Button (The plus icon top left)
- Click "Clone"
- Select the repository you just created.
- It will ask you to choose a directory, your chosen directory must contain a folder with the same name as the repository.
- Click the "Sync" button located top-right of the application.
- 单击“新建”按钮(左上角的加号图标)
- 点击“克隆”
- 选择您刚刚创建的存储库。
- 它会要求您选择一个目录,您选择的目录必须包含一个与存储库同名的文件夹。
- 单击位于应用程序右上角的“同步”按钮。
GitHub Desktop will automatically detect any changes within the directory, and will show "Uncommited Changes" within the application.
GitHub Desktop 将自动检测目录中的任何更改,并在应用程序中显示“未提交的更改”。
Commit means you are willing to submit your changes to the repository and whenyou are ready to do so click on "Uncommited Changes", provide it with a title and an optional description and then click "Commit".
提交意味着您愿意将更改提交到存储库,当您准备好提交时,单击“未提交的更改”,为其提供标题和可选描述,然后单击“提交”。
Done!
完毕!
回答by firetiger77
I've noticed with the latest version I had to maximize the window for the "Summary" and "Description" text boxes to become visible. Below those fields you will notice the "Commit to master" button.
我注意到在最新版本中,我必须最大化“摘要”和“描述”文本框的窗口才能可见。在这些字段下方,您会注意到“Commit to master”按钮。