git如何开始跟踪现有的项目 [英] git how to start tracking an existing project
问题描述
我的服务器上有我的web应用程序,我想从我的本地机器版本控制Git。
我想复制并开始追踪服务器上的内容到本地。
所以我做了什么
git --bare init应用程序在服务器上是
.git
和本地
git clone ssh://me@server/path_to_app.git'app'
git pull
以便在本地机器上获得服务器快照。
这是我想解决的错误:
你的配置指定与远程的ref'master'
合并,但是没有这样的ref被获取。
本地分支=主人
远程来源
我想制作服务器的第一张快照。
因为这是空的。
我可以运行origin add -A并提交吗?
或者类似的东西?
然后git pull?
或者是我的思路不正确?
> http://danbarber.me/using-git-for-deployment/
教程向我展示了一步一步的正确方法
I have my webapp on a server I would like to maintain from my local machine version controlled by Git.
I want to copy and start tracking what is on the server now to local.
So what I did is
on the server:
git --bare init app.git
and local
git clone ssh://me@server/path_to_app.git 'app'
And
git pull
in order to get the server snapshot on the local machine.
this is the error I would like to resolve:
Your configuration specifies to merge with the ref 'master'
from the remote, but no such ref was fetched.
local branch = master
remote origin
I would like to make a first snapshot of the server. For this is empty of coarse. Can I run origin add -A and commit? Or something like that? And then git pull?
Or is my line of thinking not correct?
this
http://danbarber.me/using-git-for-deployment/
tutorial showed me the exact right way step by step
这篇关于git如何开始跟踪现有的项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!