Today's github tip - fixing local master

Arlen arlen.ng at gmx.com
Tue Jun 18 21:21:34 PDT 2013


On Tue, Jun 18, 2013 at 2:41 PM, Walter Bright
<newshound2 at digitalmars.com>wrote:

> I often struggle with understanding how github works.
>
>
>
github or git?  In any case, have you tried setting up a local and a remote
on your local system to try out the commands without the fear of ruining
your working repo?  You can set up a local and remote on your local
computer, and push and pull from them in the same way you do with your
local repo and github.  Example:

mkdir test
cd test

git init local_repo
cd local_repo
... add files, commit, etc.

cd ../test
git clone --bare local_repo/ remote_repo

cd ../local_repo
git remote add origin ../remote_repo
... add more changes and commit
git push origin master

Note, to be able to push, that repo needs to be bare.  You can also add a
dummy linux user to your local system to play the role of a contributor.

Using this kind of setup really helped me understand git better.

Alren
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20130618/db0ccf2a/attachment-0001.html>


More information about the Digitalmars-d mailing list