Difference between revisions of "Using Git GUI"

From Geos-chem
Jump to: navigation, search
(Repository menu)
(Edit menu)
Line 35: Line 35:
  
 
[[Image:GitGuiEditMenu.png]]
 
[[Image:GitGuiEditMenu.png]]
 +
 +
#The Undo, Redo, Cut, Copy, Paste, Delete entries are self-explanatory.
 +
#Options will take you to a dialog box where you can customize the look and feel of the Git Gui (colors, fonts, etc.)
  
 
=== Branch menu ===
 
=== Branch menu ===

Revision as of 21:29, 19 June 2019

Overview

On this page, we provide information about using the Git GUI interface.

The Git Graphical User Interface (GUI)

We recommend using the git gui for source code management. Start this in your code directory:

     git gui &

This will open up a window that looks like this:

GitGui.png

On the left there are 2 windows:

  1. Unstaged Changes: An unstaged change is a modification that Git does not know about yet. If you modified any files since the last commit, then they should be displayed in this window. Also, right above this window you will find the name of the current checked-out branch.
  2. Staged Changes: These are changes that Git will add to the repository the very next time you make a commit.

In general, anytime you need to modify the source code, you should NOT do it on the master branch. You should create a new branch for your modifications. Then you can test your modifications ad nauseum until you are sure that everything is functioning as it should. When your modifications are complete, you can merge your branch into the master branch. You can then delete the branch you created.

The advantage of this approach is that if you ever need to start over from scratch, you can just go back to the master branch and you will get back the state of the code before your modifications were added.

Git Gui menus

Repository menu

GitGuiRepoMenu.png

The most important of these commands are:

  1. Visualize all branch history: This will open the Gitk browser so that you can view the revision history.
  2. Compress database: You can pack the database to reduce storage size.

Edit menu

GitGuiEditMenu.png

  1. The Undo, Redo, Cut, Copy, Paste, Delete entries are self-explanatory.
  2. Options will take you to a dialog box where you can customize the look and feel of the Git Gui (colors, fonts, etc.)

Branch menu

GitGuiBranchMenu.png

This menu is pretty self-explanatory. You can choose to:

  1. Create a new branch
  2. Checkout an existing branch
  3. Rename a branch
  4. Delete a branch
  5. Reset a branch (i.e. ignore commits newer than the present commit)

More information about branching is covered in on the Branching page.

Commit menu

GitGuiCommitMenu.png

Merge menu

GitGuiMergeMenu.png

Remote menu

GitGuiRemoteMenu.png