Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Basic Information

...

About the Repositories

There are two CARMA repositories in GitHub:

...


...

Getting Help on Git

The Linux man page for Git presents detailed information about Git. To invoke, type:

...


A tutorial introduction to Git can be accessed by typing the following at the command line:

git help tutorial 


...

Some Basic Git Commands

Some basic Git commands and a few options in no particular order:

...

  • git rm - remove files from the index and working directory
    • -r: allow recursive removal when a leading directory name is given


...

Some Online Git References

Some online references on the basics of using Git:

...

Lists basic Git commands with basic information on each and examples on their use.


...

Making and Saving Revisions to the CARMA GitHub Repositories


If you plan to submit new code or code modifications to the CARMA or CARMA_base repositories, and you don't already have a fork of the repository
you wish to modify, you will need to make one. 
Please note that you can have only a single fork of any one remote repository at a time.

...

Following are the steps to make a fork of a remote repository such as the CARMA_base or CARMA stand-alone, then create a local clone of your fork in
which to make and test modifications to the code.

Make a Fork

To make a fork of a remote repository:

...

You will be asked where to make the fork; select your GitHub account if more than one choice is offered. Your new fork will include all the branches that are
part of the parent repository.


...

Create a Clone

You will need to clone your fork to create a local copy of the repository on your Linux account; it is this local clone (local repo) where you will
make and test your changes.

...

  • Download the existing remote GitHub repository to your local repo:

git fetch ESCOMP


...

Create a New Branch in Your Clone

  • Create a branch in your clone and set it to track the remote branch main from the remote ESCOMP repository:

...

You’re now ready to make modifications in your branch on your local repository.


...

Modifying the Files in Your Clone

Make modifications and/or additions to the files in your clone, save and test your changes. Repeat this process until you’re satisfied with the changes you’ve
made.
You’re now ready to stage and commit the changes to your repository. When your modifications have been committed to your clone you can push them
up to your fork.


...

Save Your Changes to Your Local Repository

Saving your changes to your local repository involves three steps:

...

Your changes have now been committed to your local repository; you are almost ready to  push those changes up to your remote fork.
Before pushing your changes back to your fork you will need to bring your local repository up-to-date  with the remote upstream repository.


...

Bringing Your Local Branch Up-to-date with the Remote Repository

If you will be updating your local branch frequently or working in this or other branches from your fork in the future adding a "shortcut" remote
for the CARMA repository may be advisable.

...

Your working branch in your local repository is now up-to-date with the upstream remote repository.


...

Push Your Changes to Your Fork

To move your local changes up to the remote repository you will push them:

...

Note: You will be asked for your GitHub user ID when you issue the git push command.



...

Open a Pull Request (PR)

You must get approval for the changes you’ve pushed to your fork before they can be merged into the CARMA code. To do this, you will need
to open a pull request or PR.

...