如果要修改远端仓库,需要使用以下命令:
git remote set-url origin <new_url>
其中,origin
是远程仓库的名称,<new_url>
是新的仓库地址。
然后可以开始提交代码。首先将本地代码推送到远程分支上:
git push -u origin master
其中,master
是本地分支的名称。
接下来就可以开始提交代码了。使用以下命令:
git add .
git commit -m "commit message"
git push
这些命令将会把你本地所有修改过的文件添加到暂存区中,提交一个新的版本,并将它推送到远程分支上。