I have an existing Git repository on my local machine. I would like to move that repository to my web server, then git clone
on my local machine to check out my repository from the server. I'm planning on then developing on my local machine and pushing updates back to the server. I can ssh from my local machine to the server, but not vice versa. How should I go about this? I think git bundle should be used somehow, though when I tried to git clone
my bundle on my server, I got a "warning: remote HEAD refers to nonexistent ref, unable to checkout" error. My local machine is running OS X, the server is running Linux.
相关问题
- Why does recursive submodule update from github fa
- Extended message for commit via Visual Studio Code
- Emacs shell: save commit message
- Can I organize Git submodules in a flat hierarchy?
- Upload file > 25 MB on Github
相关文章
- 请教Git如何克隆本地库?
- What is the tortoisehg gui equivalent of doing “hg
- How to use Mercurial from Visual Studio 2010?
- GitHub:Enterprise post-receive hook
- Git Clone Fails: Server Certificate Verification F
- SSIS solution on GIT?
- Is it possible to do a “destroy history” in TFS?
- Compile and build with single command line Java (L
On the Linux server, in a new directory do:
Then on your local machine:
After that, the server will have a full copy of the repository, and you will be able to push and pull to and from it. There's no need to check out another clone from the server when you've already got one locally.
Instead of "git push origin master" use "git push --all origin" so that you move over all branches and not just the master branch.
How about this:
That will send the data from your local repo to your server. Then do this:
Then you will have cloned from the server. When satisfied, you can get rid of the original repo, and possibly rename the second one.