July 2018
Intermediate to advanced
354 pages
10h 57m
English
In this example, we'll be using the jgit repository as our server repository, but we have to make a clone of it to a bare repository so we can push it. You can't push to the checked-out branch on a non-bare repository, as this can overwrite the work area and index.
Create a bare repository from the jgit repository and create a new Git repository where we can play with the refspec as follows:
$ git clone --bare https://git.eclipse.org/r/jgit/jgit jgit-bare.git $ git init refspec-testsInitialized empty Git repository in /Users/john.doe/refspec-tests/.git/ $ cd refspec-tests $ git remote add origin ../jgit-bare.git
We also need to change the branch names on some of the branches to match the example for namespacing; the following ...
Read now
Unlock full access