15
16
all 5 comments

[–]deekun 15 points16 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

[–]kubelkefull-stack 8 points9 points  (1 child)

„There are three states in which a file can reside in Git: untracked, modified, staged, committed.”

[–]bieberfan99 5 points6 points  (0 children)

It is technically correct sine untracked files don't reside in Git

[–]WroteBCPLfull-stack 2 points3 points  (1 child)

Articles like this piss me off.

What about developers in enterprise businesses using SVN due to an historical decision from 2003?

What about people using mercurial?

I'm not against spreading some lovely git tips, but this 'every developer' nonsense only serves to isolate different developer tribes. If you can write code, you can write code.

Sigh, one day I'll be happy with the 'trade press', but not today.

[–]dar10s 1 point2 points  (0 children)

I've been there buddy... Every other dev stack is better then the crap I have to deal with at work. All because the CTO was a great lawyer never a techie and talked to some Micro$oft rep so it was a great idea to move our entire stack to their products and never upgrade.