pasterbuster.blogg.se

Mac command line cheat sheet
Mac command line cheat sheet










mac command line cheat sheet

Stage changes for the next commit: git add Merge the specified branch with the current branch: git merge Making Changes Rename a branch you are currently working in: git branch -m

#Mac command line cheat sheet how to#

Note: For a more detailed tutorial on working with Git branches, you can refer to our article on How to Create a New Branch or How to Switch Branches in Git.ĭelete a local branch: git branch -d Switch to a branch under a specified name (if it doesn’t exist, a new one will be created): git checkout List all branches in the repository: git branchĬreate a new branch under a specified name: git branch See the difference between the last commit and the working directory: get diff HEADĭisplay the content and metadata of an object (blob, tree, tag or commit): git show Git Branches Įxamine the difference between the working directory and the index: git diffĮxplore the difference between the last commit and the index: get diff -cached List all commits from all branches: git log -allĬompare two branches by showing which commits from the first branch are missing from the second branch: git log. List the commit history of the current branch: git log

mac command line cheat sheet mac command line cheat sheet

Show the state of the current directory (list staged, unstaged, and untracked files): git status Open Git’s global configuration file: git config -global -edit Managing Files Set a default text editor: git config -system core.editor git show git fetch allows users to fetch all objects from the remote repository that don’t currently reside in the local working directory. This Git cheat sheet saves you time when you just cant remember what a command is or dont want to use git help in the command line. For example, you can use the alias st for the status command by typing the command: git config -global alias.st status Use this handy git cheat sheet guide to enhance your workflow. Setting shortcuts for commonly used commands can speed up and simplify development. Note: Git requires you to type out the entire command to perform actions.












Mac command line cheat sheet