Recent site activity

Git Guides‎ > ‎

Working on a Local Development Branch

You should create a local branch for your development instead of working directly on the master branch.  We also recommend that you start your branch based off of edge since updates to Insoshi pass through there first before being merged onto master.

This serves a couple purposes:
  • Easy access to a clean version of the official Insoshi code
  • Allows for syncing of repositories without additional configurations of branch pushes
(We'll be going into more detail on the second in a later guide but the configuration needs to be set now.)

To create your first local branch, run the command
  git branch <your_GitHub_account> edge
You should now checkout the newly created branch
  git checkout <your_GitHub_account>
 and push up this new branch to your fork:
  git push <your_GitHub_account> <your_GitHub_account>:refs/heads/<your_GitHub_account>
git config branch.<your_GitHub_account>.remote <your_GitHub_account>
git config branch.<your_GitHub_account>.merge refs/heads/<your_GitHub_account>
This will allow you to push up your changes to with just the
  git push
(and get you in the habit of keeping your local repository and fork in sync)

At this point, you can start making updates, adding files, etc.

To add your changes to the repository, you'll run the following two commands in the top-level directory
  git add .
git commit -v
The add command records updates, new files, and file deletions to the index (essentially a holding area for changes under the control of the repository but not part of a commit). 

The commit command takes the added changes and records them as a new commit for the branch you're working on.  Only changes that have been committed can be merged, pushed, and pulled to other branches in the local and connected remote repositories.

At any point, you can see what changes you've made via
  • git status
    Displays any files that have been added, updated, etc. but not directly under the control of the repository (via git add) or not yet committed (via git commit)
  • git log
    Displays all the committed changes that have taken place along the branch