我的手提电脑上有一个当地Gite存放处。 我谨将其推向我的台式。
我如何能够这样做?
我的手提电脑上有一个当地Gite存放处。 我谨将其推向我的台式。
我如何能够这样做?
如果您能查阅共同名录,请您(见git
和 rel=“noreferer”>git 远程
<<<><<>>>><<>>>>>>>><<>>>>><>>>>>>>>>>>>>>>>>>>>>>>><>>>>>>>>>>>>>>>>>>>>>>>>><>>>>>>>>>>>>>>>>>>>>>>>>>>><>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
git clone --bare /path/to/your/laptop/repo /shared/path/to/desktop/repo.git
git remote add desktop /shared/path/to/desktop/repo.git
That will create a bare repo, referenced in your local repo as "desktop".
Since it is bare, you can push to it (as well as pull from it if needed)
git push desktop
http://progit.org/book/ch4-1.html ProGit书中提到,git确实支持档案程序:
The most basic is the Local protocol, in which the remote repository is in another directory on disk.
This is often used if everyone on your team has access to a shared filesystem such as an NFS mount, or in the less likely case that everyone logs in to the same computer.
在此,我写道,只是这样做。 文字处理所有我通常采用的新陈词典。
无疑,你必须加以修改,以适应你的任何 set,特别是如果你重新处理Windows Computer/desktop。
全文如下:
#!/bin/bash
# Create Git Repository
# created by Jim Kubicek, 2009
# jimkubicek@gmail.com
# http://jimkubicek.com
# DESCRIPTION
# Create remote git repository from existing project
# this script needs to be run from within the project directory
# This script has been created on OS X, so YMMV
#######
# Parameters
REPLOGIN=#Login name
REPADDRESS=#Repo address
REPLOCATION=/Users/Shared/Development #Repo location
# The repo name defaults to the name of the current directory.
# This regex will accept foldernames with letters and a period.
# You ll have to edit it if you ve got anything else in your folder names.
REPNAME=`pwd | egrep -o "/[a-zA-Z]+$" | egrep -o "[a-zA-Z.]+"`
# If you have standard files/directories to be ignored
# add them here
echo "Creating .gitignore"
echo build/ >> .gitignore # The build directory should be ignored for Xcode projs
echo .DS_Store >> .gitignore # A good idea on OS X
# Create the git repo
echo "Initializing the repo"
git init
git add .
git commit -m "Initial commit"
# Copy the repo to the server
echo "Copying the git repo to the server $REPADDRESS"
TEMPREP="$REPNAME.git"
git clone --bare .git $TEMPREP
scp -r $TEMPREP $REPLOGIN@$REPADDRESS:$REPLOCATION/
rm -rf $TEMPREP
# Set up the origin for the project
echo "Linking current repository to remote repository"
git remote add origin $REPLOGIN@$REPADDRESS:$REPLOCATION/$REPNAME.git/
最容易(不是最佳)的方式是通过局域网共享储存名录,并使用<代码>>(<>>>/代码>程序(见<代码>man git<>/code>)。
对我来说,最佳办法是使用<条码>gitolite(详细指示见。
Im having some confusion with my git usage. I cloned a repo from one comp to the other, and the new clone is the state of the original that was active some time ago. So its cloning a past version. ...
I was wondering if the strategy I m using for tagging and hotfixing tags (which then I use for deploying rails applications) with git is appropriate. For tagging I just tag a commit of the master ...
I have a svn repo with various apps as subdirectory of a single svn repo. That worked because I could have checked out a partial, repo. As I cant do that with git obviously I need multiple repos. I ...
I understand how to merge branches together in git, and I love how easy it makes it. I have a branch that looks like this: project/ |--subproj1/ | |---(files) | |--subproj2/ |---(files) A ...
We still use CVS, I use git and hg for my personal use though I m still a novice at both, but I realize they re much more modern and better, faster, distributed, etc. It s just everyone is so ...
I get this on every git svn command I try. I am using git version 1.6.4.2 on OS 10.6 The initial git svn fetch works, and i can do further fetches after that, but they do not enter the log or update ...
Given I have a master branch and a other branch. In the other branch are files I don t want to commit (e.g. log files) so I ignored them in .gitignore. When I switch to the master branch, these ...
Using Git at home has spoiled me - I now find using TFS at work to be a bit of a drag and want to explore the possibility of using Git locally and syncing somehow with TFS. I figure there are a few ...