如何使用Visual Studio代码连接到我现有的git仓库 [英] How do I connect to my existing git repo using Visual Studio Code

查看:1019
本文介绍了如何使用Visual Studio代码连接到我现有的git仓库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

自从v0.9.1以来,我一直在使用Visual Studio代码。我现在已经遇到需要使用GitHub和在线git repo。



我有在线git repo设置,并且已经推动使用GitHub更改到在线repo 。我最近意识到,我可以用VS代码来完成这两个步骤:编辑我的代码,然后发送到在线回购站。

我对整个git概念非常陌生。 VS代码让我安装了安装GIT Bash,GIT CMD和GIT GUI的GIT插件。



这是我试图获得的在线仓库网址:

解决方案

使用GIT插件中的 GIT GUI
$ b 在线仓库。在线仓库中包含您拥有的网址。



克隆后,对文件进行更改。当您进行更改时,您可以看到号码更改。 提交这些更改。



从远程获取(以检查您在工作时是否更新了任何内容)。



如果Fetch操作为您提供关于远程存储库中更改的更新,进行一次拉动操作,该操作将更新Visual中的副本工作室。否则,如果远程回购没有任何更改,请勿进行拉操作。



通过将更改推送到上游远程存储库推送操作

I've been using Visual Studio code for a long time, since v0.9.1. I now have run into the need to use GitHub and an online git repo.

I have the online git repo set up and have ben pushing changing to the online repo using GitHub. I have recently come to realize I can save myself a step with using VS code to do both: to edit my code, then send it up to the online repo.

I am very new to the whole git concept. VS code had me install the "GIT" plugin which installed GIT Bash, GIT CMD, and GIT GUI.

This is the online repo URL I'm trying to get to: https://github.com/SpectrumGraphics/Spectrum-Graphic-Designs.git

解决方案

Use the GIT GUI in the GIT Plugin.

Clone your online repo Online Repository with the URL which you have.

After cloning make changes to the files. When you make changes, you can see the number changes. Commit those changes.

Fetch from the Remote (to check if anything is updated while you are working).

If the Fetch operation give you an update about the changes in the remote repository, make a pull operation which will update your copy in the Visual Studio. Elsewise, do not make a pull operation if there are no changes in the remote repo.

Push your changes to the upstream remote repository by making a Push operation.

这篇关于如何使用Visual Studio代码连接到我现有的git仓库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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