Git Cheat Sheet: Make Changes
Git Cheat Sheet: Make Changes
Git Cheat Sheet: Make Changes
MAKE CHANGES
Review edits and cra f a commit transaction
$ git status
Shows file di ferences between staging and the last file version
$ git commit -m "[descriptive message]"
CONFIGURE TOOLING
Configure user information for all local repositories
$ git config --global user.name "[name]"
CREATE REPOSITORIES
Start a new repository or obtain one from an existing URL
$ git init [project-name]
GROUP CHANGES
Name a series of commits and combine completed e forts
$ git branch
training@github.com
training.github.com Learn more about using GitHub and Git. Email the Training Team
or visit our web site for learning event schedules and private class availability.
REFACTOR FILENAMES
Relocate and remove versioned files
$ git rm [file]
Deletes the file from the working directory and stages the deletion
$ git rm --cached [file]
Removes the file from version control but preserves the file locally
$ git mv [file-original] [file-renamed]
SAVE FRAGMENTS
Shelve and restore incomplete changes
$ git stash
REDO COMMITS
Erase mistakes and cra f replacement history
$ git reset [commit]
[commit]
REVIEW HISTORY
Browse and inspect the evolution of project files
$ git log
SUPPRESS TRACKING
Exclude temporary files and paths
$ git ls-files --other --ignored --exclude-standard