简体   繁体   English

将 git remote 添加到 atom

[英]Add git remote to atom

I have my app on local computer and on production server.我在本地计算机和生产服务器上都有我的应用程序。 I am able to push from command line.我可以从命令行推送。 But I can't on Atom as I get no remote.但是我不能在 Atom 上,因为我没有遥控器。 I can commit but I'm unable to push or pull.我可以承诺,但我无法推动或拉动。

For some previous project I was able to do it, Atom was recognizing the git remote without me doing anything.对于我之前的一些项目,我能够做到这一点,Atom 无需我做任何事情就可以识别 git remote。

What is the reason?是什么原因? How can i add the git remote to Atom?如何将 git remote 添加到 Atom?

check if the remote is set in the .git/config file.检查遥控器是否在.git/config文件中设置。 Usually you have something like this:通常你有这样的事情:

[remote "origin"]
        url = https://...

If you got no remote on the config file, add it with the following commands:如果配置文件中没有遥控器,请使用以下命令添加它:

git remote add origin https://github.com/nicoboni/italy-winemap.git
git push -u origin master

restart Atom and you should be able to push changes to remote重新启动 Atom,您应该能够将更改推送到远程

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM