First Checkout with Git

If git is new to you, there are lots of good write-ups on the topic. I won't rehash all the detail from other places, but assuming you have git installed and have already forked AndHow, here is the quick version of getting a local copy ready for development (from a mac/linux terminal window, enter the commands following the > prompt:

> git clone https://github.com/[your user name]/andhow.git

Cloning into 'andhow'...
remote: Counting objects: 10545, done.
remote: Compressing objects: 100% (73/73), done.
remote: Total 10545 (delta 19), reused 60 (delta 7), pack-reused 10445
Receiving objects: 100% (10545/10545), 13.

> cd andhow
> git remote add upstream https://github.com/eeverman/andhow.git
> git checkout main
  • Line 1: Clones (i.e. copies the entire project) your fork of AndHow to your local machine, into a directory named andhow in the directory you are currently in

  • Line 9: cd into that directory

  • Line 10: By forking, you have your own remote repository of AndHow on GitHub. When you cloned it, it was copied to your local machine, but it knows about that remote copy and calls it 'origin'. Line 10 tells your local copy about another remote repository that you are calling 'upstream'. You need upstream in order to pull in the latest changes to your local copy.

  • Line 11: Switch to the main branch (you would have been on the default homepage branch previously)

To begin working on, for example, Issue 123 "Long titles are too long and very wordy", create a new branch for it :

> git checkout -b Issue123-Long-titles

Later you will commit, push, and put in a pull request, but I'll leave those details to other references.

Last updated