Getting Git

I have used Git before in projects but I have to admit that sometimes I feel like that I am just following a pre-set of rules and steps to make things work and not really deeply understanding the tool. This, I feel, isn’t deserving of Git because it’s an amazing tool – as difficult and out-of-this-world as it is for me.

I started messing about with my GitHub account (finally) and committing some programming practices and in the process, slowly learning bits and pieces about GitHub, Git, and other tools. Here are a couple of things I’ve done so far –

GitHub Desktop tool
GitHub Desktop tool
  • I started using GitHub Desktop tool which is pretty handy and simple but…
  • I found myself having a branch that is behind my master branch and the same branch is ahead of master by some commits. After a couple of fetching, pulling requests, and merging via GitHub web and desktop tool, I somehow got them even. I think that was too much trial and error on my part and not a very efficient way of doing things.
  • I opted to refresh on my basic Git and I found an old fave Try Git and finished it
  • I am new to using a Mac so there are (a lot) of things I don’t know yet. I found git wasn’t working for me in the Terminal. I got an error –
    renee:~ renee$ git –version
    xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
  • I found that I needed to install XCode command line and it did the trick! xcode-select –install
xcrun error
xcrun error
Using Git in Terminal
  • At the end of the day, I was able to merge these updates from my branch to master and push it to GitHub without a hitch. I know this is quite simple for now but I am happy to go through this learning process.

With more practice, I hope to get rid of this little nervousness I have when using Git, especially via Terminal. This is not a comprehensive guide as this is just my study notes but I hope this helps you, too.


Supplementary books: