git - How does initializing a repository with a README help in letting you immediately clone the repository to your computer? -


github repository creation how connected in way?

git can clone empty repository.

but in case, end-up repo no branch, can unsettling git beginners.

that means that, when create own commit in empty cloned repo, need setup upstream branch on first push, git push -u origin master.
again, bit of hassle when discover git.
see "why need explicitly push new branch?"

hence recommendation creating @ least 1 file, meaning @ least 1 commit in master branch.
plus, cloned repo has local master branch upstream branch already setup: when new commits done locally, simple git push enough send them github repo.

those 2 points (local repo master branch, and remote tracking branch origin/master) make easier experience.

if importing existing repo, on other hand, want empty repo begin with.


Comments

Popular posts from this blog

javascript - oscilloscope of speaker input stops rendering after a few seconds -

javascript - gulp-nodemon - nodejs restart after file change - Error: listen EADDRINUSE events.js:85 -

Fatal Python error: Py_Initialize: unable to load the file system codec. ImportError: No module named 'encodings' -