Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/289.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 如何在命令行上更新git hub存储库_Python_Github_Repository_Git Pull - Fatal编程技术网

Python 如何在命令行上更新git hub存储库

Python 如何在命令行上更新git hub存储库,python,github,repository,git-pull,Python,Github,Repository,Git Pull,我想更新可以找到的GitHub存储库 我这样做是为了可以使用一个新命令,但是我不知道怎么做。我尝试过使用pip安装更新方法,但没有成功 sudo pip3安装SCS/-U 我想我可能需要做一个git pull,但我不确定如何实现它。下面是如何将现有项目添加到github 下载和更新回购协议的过程通常如下所示: git clone [remote repository URL] # Clones the repo git init # initializes the local repo git

我想更新可以找到的GitHub存储库 我这样做是为了可以使用一个新命令,但是我不知道怎么做。我尝试过使用pip安装更新方法,但没有成功

sudo pip3安装SCS/-U


我想我可能需要做一个git pull,但我不确定如何实现它。

下面是如何将现有项目添加到github


下载和更新回购协议的过程通常如下所示:

git clone [remote repository URL]
# Clones the repo
git init
# initializes the local repo
git remote add origin [remote repository URL]
# Sets the new remote
git remote -v
# Shows the new remote URL
从这里,您可以修改或添加要使用的文件

git add [file name(s)]
# Adds files to commit
git commit -m "commit message"
# Creates the commit, with a message
git push origin master
# Pushes the changes in your local repository up to the remote repository you specified as the origin

您是否克隆了要更新的回购协议?您有romote原点设置吗?@TumoMasire几个月前已经克隆了repo,但我不确定远程原点设置是否正确。我认为这与堆栈溢出无关。关于这个问题有很多资料。请参阅:,。您好,谢谢,但是如果我以前已经安装了回购协议,我需要再次安装吗?我只想更新它,这样它就添加了一些新命令。如果安装了repo,那么只需在文件夹中打开命令行提示符并运行:git remote-v。它应该显示您是否连接了远程源。如果您有远程源,那么您可以编辑所需的文件,并运行:git commit-am message。要添加所有已修改的文件,请使用-a标志。如果创建新文件,则在运行:git commit之前,需要使用:git add file.name进行添加。