https://git.company.com/abc.git
我想克隆、修改和提交代码,应该怎么做?
你需要进行以下步骤:
https://git.company.com/abc.git
我想克隆、修改和提交代码,应该怎么做?
你需要进行以下步骤:
为了回答这个问题,我假设你已经拥有一个git仓库,并在Atom中安装了git-plus
和git-clone
packages。
学习目标: 配置Atom编辑器和Git Clone package,将您的git仓库克隆到合适的位置。
Packages
,找到git-clone
。git-clone
包的Settings
按钮,这将打开设置页面。Target Directory
设置为适合您的操作系统和设置的内容。 我强烈建议使用快速本地驱动器,例如SSD。学习目标: 使用Atom编辑器和Git Clone包将代码从中央代码库复制到您的开发机器上。
First identify the appropriate git URL, I will be using a GitHub URL but this could be any git URL.
git@github.com:RichardSlater/activate-power-mode.git
From Atom press Ctrl-Shift-P to open up the Command Palette then type: Git Clone
to select Git Clone: Clone.
学习目标: 查看如何使用Atom编辑器和Git Plus包对代码进行更改,并将其推回中央存储库。
lib/activate-power-mode.coffee
.We're going to change the throttle limit on Line 32
from 25
to 50
- go ahead and make this change:
@throttledSpawnParticles = throttle @spawnParticles.bind(this), 50, trailing: false
Save this file, note that the color of the file in the TreeView has changed to Orange and the status bar will have a git status message on the right hand side:
+ 1, -1
Now we need to add this file, open the Command Palette again by pressing Ctrl-Shift-P then typing git add
, press enter to stage the current file.
git commit
, a new buffer will open where you can type a commit message. Go ahead and type a commit message.git push
.现在,您应该已经通过 Atom 编辑器对您的中央 git 仓库进行了更改。
虽然 Atom 是由 GitHub 积极开发,但它并不强烈依赖于 github.com 或者托管在 GitHub 上的项目。我强烈推荐使用 git-plus
包,它显著地扩展了内置 Git 支持,允许进行以下操作:
git-clone
包来支持克隆操作。
虽然这个截图展示了GitHub的网页界面,但实际上你可以使用任何git存储库的URI。