Group project for Cloud Software Design
Note: If you wish to store any output from a git command in a file, do so with <git_command> > output.txt, you can replace output.txt with a name of your choice. This works in git bash.
List the files that have been modified, as well as files that have not yet been added to the repo.
Commit one or more files by listing their file names, and adding a message. Remember to give meaningful commit messages.
Commit all files which have been modified.
Add files to the repo, they will still need to be committed!
Note: The term "checkout" refers to the action of changing all of the files in your repo to match a particular branch or commit.
Checkout a branch, make sure you've committed your changes to your local branch.
Checkout a specific commit. This is a very useful command for when a section of your project was working and is now broken.
Warning, this command will not save uncommited changes made to your local branch (git usually issues a warning / error about this).
Create a new branch with the name <new_branch_name> using the commit <commit_id>.
Display the branch you are currently using.
This will output the differences between two different commits, very helpful for debugging. You may want to send the output of this command to a different file via the > utility (available in git bash).
Get a list of commits made up until the most recent commit stored on your local branch.
You can then use the commit id returned by this command with git checkout.
Outline of a single commit from the command : git log.
commit <commit_id>
Author: <full_name> <email@domain>
Date: Weekday Month Day Time Year
<commit_message>
You can then use the <commit_id> in conjunction with the git checkout command.
usage: git [--version] [--help] [-C <path>] [-c name=value]
[--exec-path[=<path>]] [--html-path] [--man-path] [--info-path]
[-p | --paginate | --no-pager] [--no-replace-objects] [--bare]
[--git-dir=<path>] [--work-tree=<path>] [--namespace=<name>]
<command> [<args>]
These are common Git commands used in various situations:
cloneClone a repository into a new directory
initCreate an empty Git repository or reinitialize an existing one
addAdd file contents to the index
mvMove or rename a file, a directory, or a symlink
resetReset current HEAD to the specified state
rmRemove files from the working tree and from the index
bisectUse binary search to find the commit that introduced a bug
grepPrint lines matching a pattern
logShow commit logs
showShow various types of objects
statusShow the working tree status
branchList, create, or delete branches
checkoutSwitch branches or restore working tree files
commitRecord changes to the repository
diffShow changes between commits, commit and working tree, etc
mergeJoin two or more development histories together
rebaseReapply commits on top of another base tip
tagCreate, list, delete or verify a tag object signed with GPG
fetchDownload objects and refs from another repository
pullFetch from and integrate with another repository or a local branch
pushUpdate remote refs along with associated objects
'git help -a' and 'git help -g' list available subcommands and some concept guides. See 'git help ' or 'git help ' to read about a specific subcommand or concept.