pro*_*spk 14 git version-control
我的公司没有中央git服务器,也没有允许我使用BitBucket等.
无论如何我可以使用我的localhost remote吗?
编辑:我在一台Windows机器上
Jan*_*ger 16
本地目录的工作方式与远程存储库URL类似,因此只要您是唯一使用存储库的人,基本上就没有什么需要做的.
例如,假设Git Bash(来自msysgit):
mkdir /c/git
mkdir /c/git/testrepo.git
cd /c/git/testrepo.git
git init --bare
cd $TEMP
git clone /c/git/testrepo.git
cd testrepo
# hackety hack
git add .
git commit -m "I shouldn't be making commits like this but who's gonna sue me"
git push origin master
cd ..
git clone /c/git/testrepo.git testrepo2
cd testrepo2
# wow, all my files are here
Run Code Online (Sandbox Code Playgroud)
也就是说,只需创建一个普通的本地存储库,就可以为git init您提供一个完整的Git存储库,您可以在其中进行提交和所有操作,以及可以克隆和合并/提取的存储库.大多数时候,这真的是你所需要的.
| 归档时间: |
|
| 查看次数: |
17512 次 |
| 最近记录: |