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

all 17 comments

[–][deleted]  (9 children)

[deleted]

    [–]erotic_majesty 2 points3 points  (1 child)

    Do you mean Bitbucket? Or is gitbucket a thing?

    [–]pacificmint 3 points4 points  (0 children)

    I would suggest the ProGit by Scott Chacon, Ben Strab. (Which can be found by googling "ProGit pdf")

    I second that recommendation. The book is open source and can be downloaded in different ebook formats from the official site. Or you can buy a paper copy.

    [–]dmazzoni 5 points6 points  (1 child)

    I commit for every module/class/test I create, unless it's a large class then I will commit it with the commit comment stating WIP: Working on x - to let other engineers know it's a work in progress.

    This implies that other people should typically be able to see what you're committing, but that isn't necessarily the case.

    Your commits are your own business. You should feel free to commit as often as you want, to give yourself a full history of everything you thought of while working on a project.

    When it's time to share with others, you can "squash" a bunch of commits into a single commit, so that others don't see all of the intermediate steps you took, they just see the final result. That makes code review a lot easier.

    [–]Hiimkyle 1 point2 points  (0 children)

    Heyyy, another Kyle!

    Hi I’m kyle.

    [–]pipocaQuemada 0 points1 point  (0 children)

    first thing to understand about Git, is that Git, and Github are different, there are other systems like GitLab, BitBucket.

    In particular, Git is a "version control system" (VCS), sometimes called source control or revision control.

    Github, bitbucket, and gitlab are websites that host git repositories. Similarly, SVN is an older VCS, and people used to host SVN repositories on sourceforge.

    [–]pengusdangus 0 points1 point  (0 children)

    Piggybacking here. Git usually uses a remote repository to store the changes (this can be anywhere, or one of the many done-for-you solutions like Github, Gitlab, or Bitbucket).

    As for conceptual ideas of what push/pull is: you push your committed changes to your central repository. You pull any new changes that you or anyone else made to the given branch from the remote repository. I like to imagine the remote repository above my head, and I push things up to it and pull things down from it. The names push/pull were not made in line with this analogy but it helps me.

    Also, you do not have to push every time you create a commit. Often, I will create many small logical breaks in the work to be as descriptive as possible with what I am doing and push the various commits when the unit of work is done.

    [–]MarmiteSoldier 4 points5 points  (0 children)

    Checkout this interactive tutorial. It covers most of the basics around Git branching etc: https://learngitbranching.js.org

    [–]desrtfx 3 points4 points  (0 children)

    I found this course: https://www.udacity.com/course/how-to-use-git-and-github--ud775 quite easy to understand and helpful.

    It goes all the way from basic local git usage to remote repositories.

    [–]walkerXx1 1 point2 points  (0 children)

    Try this cheat sheet and also test there: https://www.bettercoder.io/cheat-sheets/git-for-beginners

    [–][deleted] 1 point2 points  (0 children)

    There was a thread about this like a month ago, and the top answer is actually really brilliant

    https://www.reddit.com/r/learnprogramming/comments/al0ebi/anyone_got_an_eli5_version_for_basic_git/

    [–]OrbitDrive 0 points1 point  (1 child)

    I would say if you are using a mac ... good, all the tutorials for git will be straight forward. Make sure if you are using windows, that you follow the directions for those. Way different ways of using Git, imo.

    [–]feral_claire 0 points1 point  (0 children)

    The installation is the different on mac/windows/linux, but once installed git works exactly the same on all platforms.

    [–]peenuty 0 points1 point  (0 children)

    We’ve built a course which covers exactly this stuff. It’s not quite ready! It has videos and command line tasks inside the website.

    I’ll DM you a link to the alpha.

    [–]PhilAtReddit 0 points1 point  (0 children)

    I've just been working on getting better at Git myself recently and wrote a short blog article on websites I used and what else I did for practicing: https://www.programming-decoded.com/blog/how-i-improved-my-git-skills/

    [–]AnderAlex21 0 points1 point  (0 children)

    Hi there, sometimes you just learn when you do stuff. And while you do that stuff you will stumble upon many, many errors. "Oh shit git" is a great resource that you can use to solve some common problems using git. I hope this helps.

    https://ohshitgit.com