Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Remove more whitespace somehow inserted.

This document provides details on ACME development conventions and practices.

...

important -- Items colored in red mean they are important, and should not be ignored.

one time -- Items colored in green are commands to be issued once per machine.

repo once -- Items colored in orange are commands to be issued once per local repository.

...

 Any of these options can be combined to give more flexibility to exploring the history of a git repository and make the history more useful.

...

Committing new files and changes as you go

...

While working on a feature or a bug fix, you will be editing source code files. After editing a file, you might want to commit those changes to your local repository in order to checkpoint your work, or track the change you made. By default, git doesn’t track any files in the repository unless they are explicitly added to the repository. In order to add a file to the repository, you can use the following command:

 

git add path/to/file/in/repo

 

In addition to causing git to track the file, this will also stage all changes in the file. The next commit that is created will contain all changes in the stage by default. In order to commit only the changes in the staging area, the following command can be used:

...

git commit

...

NOTE:   The git add command will only stage the changes in the file at the time of the git add. If the file is subsequently modified after a git add, and then a git commit is issued, the commit will not contain changes between the git add and the git commit.

 

This will open up an editor where a commit message can be written. The first line is the subject line and should be relatively short and concise. The second line should be blank, and every line below that can be the “body” of the commit message with as much information as needed.

 

An alternative way of committing all changes to any files that are currently tracked by the repository is:

 

git commit -a

...

This will again open an editor for a commit message to be entered.
 
 

...

Using the "Assignee" menu, add the name of the designated Integrator for your component.  See Integrator Guide for a list.  This will start the code review and the process of moving this feature to master.


This document can be used to help with pull request related issues.

...

Below is a summary of the above sections. It will provide an ordered list of commands for a typical workflow. This will not describe why you would use these commands, or even what they do, simply a typical order for a standard project. Some items will be left out, like incorporating changes from an external project that your project is dependent on.


  1. git clone git@github.com:ACME-Climate/ACME.git  
    (only need to do this once per development platform (your laptop, Mira,Titan, etc.)

  2. cd ACME

  3. git checkout -b github-username/component/feature acme-vXX

  4. Repeat the following until development is complete:

    • vim file # make changes to files, or add new files

    • git add new-files

    • git commit -a # Edit commit message, based on template

    • Optional: git rebase -i <commit>

  5. Optional: Incorporate externally developed feature into your feature

    • Option 1: git cherry-pick <commit>

    • Option 2: git merge [commit] [branch]

    • Option 3: git rebase -i <new-base>

  6. Perform tests as needed throughout development process, but at a minimum before you submit a pull request.

  7. git push ACME-Climate/ACME github-username/component/feature
    (push to the shared repository on github)

  8. Visit http://github.com/ACME-Climate/ACME and submit a pull request to ACME/master

...

Before communicating with remotes, you might want to add or remove remotes. In order to add and remove remotes the git remote command can be used. The two uses are as follows:

git remote add remote-name protocol:address/to/repo # Creates a remote

 

git remote remove remote-name # Removes a remote

  

In order to communicate with remotes, there are three actions. pushpull, and fetch.

...