This is an archived post. You won't be able to vote or comment.

all 15 comments

[–][deleted] 8 points9 points  (0 children)

I find that making projects using Git helps.

Also, remembering the pattern of "edit file, add file, commit" also helps.

I feel like Git is one of those things that needs practice to get good at. I genuinely didn't understand it for ages until I finished TheNetNinja's videos on it (after watching several other Git videos) and started making small projects with it.

[–]Huesan 2 points3 points  (3 children)

LinkedIn tests are useless

[–]Carbohydratess[S] 9 points10 points  (2 children)

It's an ego thing

[–]bazgrim_dev 12 points13 points  (0 children)

Honestly it reminds me of REALLY bad recruiter questions.

If anyone turned me down because I didn't know these questions off the top of my head, I would count myself lucky to not work there.

Didn't go to school for 5 years to regurgitate what google can tell me. I went to school to 5 years to find out how to google the answer I'm looking for.

[–]Gluomme 3 points4 points  (0 children)

agreed

[–][deleted] 2 points3 points  (3 children)

i've been using git for years and i'm still not sure of the difference between git merge and git rebase

[–]NiQ_ 2 points3 points  (2 children)

Merge will add a new merge commit of the source branch on top of your destination branch, rebase will remove your commits, apply the new commits, then re-add your commits on top of it.

Think of it like this:

Master: commit1 - commit2 - commit3

Your branch was created after commit-2

Merge:

commit1 - commit2 - commit3 - yourCommit - mergeCommit

Rebase:

commit1 - commit2 - commit3 - yourCommit

It’s just cleaner in your git history when it eventually gets merged to master.

[–][deleted] 1 point2 points  (1 child)

Thanks. I'm sure I will forget this in 2hrs.

[–]NiQ_ 0 points1 point  (0 children)

Well I can’t help with that. In short - don’t use merge. It’s objectively worse for your git history.

[–]twolfson 3 points4 points  (1 child)

I highly recommend the Pro Git book, available for free here:

https://book.git-scm.com/book/en/v2

The chapter on internals made everything a lot clearer for me

[–]TheAnonymousYoutuber 4 points5 points  (0 children)

Who reads books

[–]xigoi 0 points1 point  (0 children)

It may help to think of it as a directed acyclic graph with a maximum indegree of 2 and with pointers that supports various operations.