Git config -global alias. Git config -global alias.ld 'log -pretty=format:"%C(yellow)%h\\ %ad%Cred%d\\ %Creset%s%Cblue\\ " -decorate -date=relative' # list oneline commits showing relative dates Git config -global alias.ll 'log -pretty=format:"%C(yellow)%h%Cred%d\\ %Creset%s%Cblue\\ " -decorate -numstat' # list commits showing changed files Git config -global alias.ls 'log -pretty=format:"%C(yellow)%h%Cred%d\\ %Creset%s%Cblue\\ " -decorate' # list commits in short form Git config -global alias.hist 'log -graph -pretty=format:"%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)%Creset" -abbrev-commit -all' Git config -global alias.last5 'log -5 HEAD' # see last 5 commits SAML Implementation Preparation (source) InnerSource Theory. Git config -global alias.last 'log -1 HEAD' # see last commit GitHub Training Manual (source) GitHub Administrator Manual. Git config -global alias.unstage 'reset HEAD -' # unstage changes GitHub Cheat Sheet A collection of cool hidden and not so hidden features of Git and GitHub. Git config -global alias.st status # git status Git config -global alias.ci commit # git commit Join a live Webinar and learn from a Git professional. Git config -global alias.br branch # git branch Learn how to undo and recover from mistakes with our handy videos series and cheat sheet. This way you will be able to stay more productive by not needing to look up these commands so often as youâre working with your GitHub Pull Requests, Issues, and Repositories from the command-line.Git config -global checkout # git checkout Create repository: git init Add file: git add Remove file: git rm Move or rename file: git mv Commit changes: git commit Show changes: git status Show log: git log Show log with tags: git log -decorate Search thru commit messages: git log -grep'' Branches.Using both of these cheat sheets will definitely help you level-up your Git and GitHub CLI game!įeel free to print this GitHub CLI cheat sheet, or save it to your desktop, for easy access to common GitHub CLI commands. Git Cheat Sheet Available â I have also created a Git cheat sheet you can download too. The GitHub CLI Cheat Sheet is available in a couple different formats for download: Hereâs a cheat sheet Iâve put together that showcases many of the GitHub CLI commands to help you be more productive at the command-line as you perform operations against your GitHub Pull Requests, Issues, and Repositories! Luckily, the GitHub CLI (gh) offers a full command-line / terminal experience for working with GitHub. This usually indicates a newly created file. Untracked: Files arent tracked by Git yet. Unstaged: Files with changes that have not been prepared to be committed. However, this requires context switching between CLI and browser. Glossário: Repository: A directory where Git has been initialized to start version controlling your files. This cheat sheet features the most important and commonly used Git commands for easy reference. Of course, when committing file changes and merging branches, you still use the git CLI. Git is the free and open source distributed version control system that's responsible for everything GitHub related that happens locally on your computer. Enables helpful colorization of command line output. ls: The ls command is used to list files or directories. git config global user.email ' email address' Sets the email you want attached to your commit transactions. pwd The pwd (Present Working Directory) command is used to print the name of the present/current working directory starting from the root. When working with GitHub Repositories, the website provides an excellent interface for working with Issues, Pull Requests, and Repositories. git config global user.name ' name' Sets the name you want attached to your commit transactions.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |