From 7f54200417cdb77d963504b8800d8f85915bab7b Mon Sep 17 00:00:00 2001 From: Christian Kluge Date: Tue, 20 Oct 2020 11:43:00 +0200 Subject: [PATCH 1/2] #20 added TODO, corrected typos --- README.md | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index ec6c851..a15dbf0 100644 --- a/README.md +++ b/README.md @@ -3,8 +3,8 @@ This is an empty template for creating TypeScript projects. It also includes ESLint and Jest. You have two ways of creating a new project: -1. is by [forking](https://guides.github.com/activities/forking/) -2. is by [duplicating](https://docs.github.com/en/free-pro-team@latest/github/creating-cloning-and-archiving-repositories/duplicating-a-repository) +1. by [forking](https://guides.github.com/activities/forking/) +2. by [duplicating](https://docs.github.com/en/free-pro-team@latest/github/creating-cloning-and-archiving-repositories/duplicating-a-repository) ### Why forking? @@ -32,7 +32,7 @@ With _git clone --bare_ you will get all of the tags copied, local branches, no ## Duplicating a repository - go to your GitHub account -- create a new repository e.g. myprojects-typescript-template +- create a new repository i.e. myprojects-typescript-template - open Git Bash - create a bare clone of the repository ``` @@ -43,7 +43,7 @@ $ git clone --bare https://github.com/software-developer-org/typescript-template $ cd typescript-template.git ``` - mirror-push to your new repository on GitHub -- doing a ['mirror-push'](https://git-scm.com/docs/git-push) means that, after the push, your remote repo on GitHub is exactly the same like your local local repository (which you bare cloned before) +- doing a ['mirror-push'](https://git-scm.com/docs/git-push) means that, after the push, your remote repo on GitHub is exactly the same like your local repository (which you bare cloned before) ``` $ git push --mirror https://github.com/_yourusername_/myprojects-typescript-template.git ``` @@ -52,9 +52,11 @@ $ git push --mirror https://github.com/_yourusername_/myprojects-typescript-temp $ cd .. $ rm -rf typescript-template.git ``` -## Why duplicating? - -With [_git clone --bare_](https://git-scm.com/docs/git-clone) you will get all of the tags copied, local branches, no remote tracking branches. That is, all branches are copied as is, and it's set up completely independent, with no expectation of fetching again. Any remote branches (in the cloned remote) and other refs are completely ignored. Your new GitHub repository will now not be affected by changes in the initial repo, like forking, anymore. +> **TODO:** +> HEADER: Using your duplicated repository together with the intitial repository in daily gitworkflow +> - short explanation worklow -> link +> - short setup for remote add -> +> - example for working # Setup tool chain From 8a5d310f7db72ddfd33bc0abf71b5ba26a11d690 Mon Sep 17 00:00:00 2001 From: Christian Kluge Date: Sun, 25 Oct 2020 10:12:05 +0100 Subject: [PATCH 2/2] #21 added missing description, added link to workflow --- README.md | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index a15dbf0..f53848e 100644 --- a/README.md +++ b/README.md @@ -41,6 +41,8 @@ $ git clone --bare https://github.com/software-developer-org/typescript-template - navigate to the repository (a bare clone repo will end with _.git_!) ``` $ cd typescript-template.git + +$ typescript-template.git (BARE:master) ``` - mirror-push to your new repository on GitHub - doing a ['mirror-push'](https://git-scm.com/docs/git-push) means that, after the push, your remote repo on GitHub is exactly the same like your local repository (which you bare cloned before) @@ -50,13 +52,16 @@ $ git push --mirror https://github.com/_yourusername_/myprojects-typescript-temp - remove the temporary local repository ``` $ cd .. -$ rm -rf typescript-template.git +$ rm -rf typescript-template.git/ +``` +- as explained above, a _bare clone_ has no working tree, your not connected to the remote repository. its just the repository data! +so, you have to clone your new remote repo to your local workspace ``` -> **TODO:** -> HEADER: Using your duplicated repository together with the intitial repository in daily gitworkflow -> - short explanation worklow -> link -> - short setup for remote add -> -> - example for working +$ git clone https://github.com/_yourusername_/myprojects-typescript-template.git +``` +## Using duplicates and remotes in daily work + +If you interested when to use 'forking', 'duplicating' or both of them, please read about [branches and workflow](https://github.com/software-developer-org/sandbox/blob/feature/34-branches/challenge-010/00034-gitflow_summary.md). # Setup tool chain