I want to use an existing project as a starting point for a new project by copying or cloning it.There are at least two ways of doing this.Method 1: Copy it.cp -R /path/to/source /path/to/destandMethod 2: Clone it.git clone /path/to/sourceWhat are the relative advantages and disadvantages of each approach compared to the other? Or do they both produce essentially exactly the same result?
git clone vs cp -R
git;unix;shell;bash
Copying copies the working copy, any untracked files, and any local configuration along with the actual repository.Cloning doesn't, but it sets up the origin remote with a tracking branch.Use copying if you want to duplicate your repository so that all remote operations work the same. Use cloning if you want to create a subordinate repository to your original.