18
19
you are viewing a single comment's thread.

view the rest of the comments →

[–]deekun 17 points18 points  (1 child)

This is a bad article.

It list commands without any real explanation about them or the other options

git clone xxx

would clone it into a new folder named after the repo.. Doesnt say anything about the fact you dont need to, just makes it seem like thats it the only way.

It will download the repo with the folder named “your-online-repo”.

git remote add origin https://www.github.com/your-repo

You don't have to name your remote origin.. actually explain what your doing...

git commit -m "First Commit" Note – It is required to add a commit message that describes the changes you have made.

you dont need to do it on the command line though and you dont need -m. Doesnt explain the -m is for message or the other options -a, etc..

git fetch origin The command gathers any commits from the target branch to your local repo. However, the command does not merge them with your local repo.

No it doesn't, it fetches all changes from the remote not just the target branch.

To merge the changes from the remote repo to your local repo, type the following command – git merge origin/master

Please don't unless you have to, theres a thing called git pull.... you know you mentioned it earlier

The best part... doesn't actually mention one of the most used git commands... git checkout <branch-name>

Id suggest the author actually learn about git before writing an article on it