Repository Setup: Command Line - liz-miller/albiorix GitHub Wiki

UPDATE: use this configuration for command-line configuration.

Setup the Repository: Use these instructions for UNIX-based OS configuration

Cloning the Repository

  1. Open a terminal window and change directory to where you want the repository to be located.
  2. Clone the repository using this command: $ git clone https://github.com/liz-miller/albiorix.git
  3. Login with your Github username and password.
  4. This will create a local copy of the albiorix repo.

Creating your own Branch (call it your first name in all lowercase)

  1. Type in the following command, where xxxx is the name of the branch you want to create: $ git checkout -b xxxx

i.e. if your name is joe, use this command: $ git checkout -b joe

  1. You are now working in your branch.

  2. To switch which branch you are in, use this command, where xxxx is the existing branch you want to switch to: $ git checkout xxxx i.e. to change back to the master branch, use this command: $ git checkout master

Add then Commit your changes to the Repository. MAKE SURE YOU ARE ON YOUR OWN BRANCH!

  1. Use the following command to add the filename to the repository: $ git add <filename> or to add a bunch of files use: $ git add *
  2. Commit using this command: $ git commit -m "Commit message"

Now you have to "merge" your changes for them to appear in the repository

  1. First update your local repository by "pulling" in the newest commit $ git pull
  2. Then preview your merge by comparing your source branch to your target branch $ git diff <source_branch> <target_branch>
  3. Merge: $ git merge <branch>

A built-in git GUI can be launched using the following command $ gitk

The commit log can be accessed using this command: $ git log

Tagging Software Releases: To be added.

For more git commands, refer to this resource: http://rogerdudler.github.io/git-guide/

⚠️ **GitHub.com Fallback** ⚠️