diff --git a/README.md b/README.md index ec6c851..f53848e 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 ``` @@ -41,20 +41,27 @@ $ 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 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 ``` - 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 +``` +$ git clone https://github.com/_yourusername_/myprojects-typescript-template.git ``` -## Why duplicating? +## Using duplicates and remotes in daily work -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. +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