Git Cheetsheet

๐Ÿญ. ๐—ด๐—ถ๐˜ ๐—ฑ๐—ถ๐—ณ๐—ณ: Show file differences not yet staged. ๐Ÿฎ. ๐—ด๐—ถ๐˜ ๐—ฐ๐—ผ๐—บ๐—บ๐—ถ๐˜ -๐—ฎ -๐—บ "๐—ฐ๐—ผ๐—บ๐—บ๐—ถ๐˜ ๐—บ๐—ฒ๐˜€๐˜€๐—ฎ๐—ด๐—ฒ": Commit all tracked changes with a message. ๐Ÿฏ. ๐—ด๐—ถ๐˜ ๐˜€๐˜๐—ฎ๐˜๐˜‚๐˜€: Show the state of your working directory. ๐Ÿฐ. ๐—ด๐—ถ๐˜ ๐—ฎ๐—ฑ๐—ฑ ๐—ณ๐—ถ๐—น๐—ฒ_๐—ฝ๐—ฎ๐˜๐—ต:Add file(s) to the staging area. ๐Ÿฑ. ๐—ด๐—ถ๐˜ ๐—ฐ๐—ต๐—ฒ๐—ฐ๐—ธ๐—ผ๐˜‚๐˜ -๐—ฏ ๐—ฏ๐—ฟ๐—ฎ๐—ป๐—ฐ๐—ต_๐—ป๐—ฎ๐—บ๐—ฒ: Create and switch to a new branch. ๐Ÿฒ. ๐—ด๐—ถ๐˜ ๐—ฐ๐—ต๐—ฒ๐—ฐ๐—ธ๐—ผ๐˜‚๐˜ ๐—ฏ๐—ฟ๐—ฎ๐—ป๐—ฐ๐—ต_๐—ป๐—ฎ๐—บ๐—ฒ: Switch to an existing branch. ๐Ÿณ. ๐—ด๐—ถ๐˜ ๐—ฐ๐—ผ๐—บ๐—บ๐—ถ๐˜ --๐—ฎ๐—บ๐—ฒ๐—ป๐—ฑ:Modify the last commit. ๐Ÿด. ๐—ด๐—ถ๐˜ ๐—ฝ๐˜‚๐˜€๐—ต ๐—ผ๐—ฟ๐—ถ๐—ด๐—ถ๐—ป ๐—ฏ๐—ฟ๐—ฎ๐—ป๐—ฐ๐—ต_๐—ป๐—ฎ๐—บ๐—ฒ: Push a branch to a remote. ๐Ÿต. ๐—ด๐—ถ๐˜ ๐—ฝ๐˜‚๐—น๐—น: Fetch and merge remote changes. ๐Ÿญ๐Ÿฌ. ๐—ด๐—ถ๐˜ ๐—ฟ๐—ฒ๐—ฏ๐—ฎ๐˜€๐—ฒ -๐—ถ: Rebase interactively, rewrite commit history. ๐Ÿญ๐Ÿญ. ๐—ด๐—ถ๐˜ ๐—ฐ๐—น๐—ผ๐—ป๐—ฒ: Create a local copy of a remote repo. ๐Ÿญ๐Ÿฎ. ๐—ด๐—ถ๐˜ ๐—บ๐—ฒ๐—ฟ๐—ด๐—ฒ: Merge branches together. ๐Ÿญ๐Ÿฏ. ๐—ด๐—ถ๐˜ ๐—น๐—ผ๐—ด --๐˜€๐˜๐—ฎ๐˜: Show commit logs with stats. ๐Ÿญ๐Ÿฐ. ๐—ด๐—ถ๐˜ ๐˜€๐˜๐—ฎ๐˜€๐—ต: Stash changes for later. ๐Ÿญ๐Ÿฑ. ๐—ด๐—ถ๐˜ ๐˜€๐˜๐—ฎ๐˜€๐—ต ๐—ฝ๐—ผ๐—ฝ: Apply and remove stashed changes. ๐Ÿญ๐Ÿฒ. ๐—ด๐—ถ๐˜ ๐˜€๐—ต๐—ผ๐˜„ ๐—ฐ๐—ผ๐—บ๐—บ๐—ถ๐˜_๐—ถ๐—ฑ: Show details about a commit. ๐Ÿญ๐Ÿณ. ๐—ด๐—ถ๐˜ ๐—ฟ๐—ฒ๐˜€๐—ฒ๐˜ ๐—›๐—˜๐—”๐——~๐Ÿญ: Undo the last commit, preserving changes locally. ๐Ÿญ๐Ÿด. ๐—ด๐—ถ๐˜ ๐—ณ๐—ผ๐—ฟ๐—บ๐—ฎ๐˜-๐—ฝ๐—ฎ๐˜๐—ฐ๐—ต -๐Ÿญ ๐—ฐ๐—ผ๐—บ๐—บ๐—ถ๐˜_๐—ถ๐—ฑ: Create a patch file for a specific commit. ๐Ÿญ๐Ÿต. ๐—ด๐—ถ๐˜ ๐—ฎ๐—ฝ๐—ฝ๐—น๐˜† ๐—ฝ๐—ฎ๐˜๐—ฐ๐—ต_๐—ณ๐—ถ๐—น๐—ฒ_๐—ป๐—ฎ๐—บ๐—ฒ: Apply changes from a patch file. ๐Ÿฎ๐Ÿฌ. ๐—ด๐—ถ๐˜ ๐—ฏ๐—ฟ๐—ฎ๐—ป๐—ฐ๐—ต -๐—— ๐—ฏ๐—ฟ๐—ฎ๐—ป๐—ฐ๐—ต_๐—ป๐—ฎ๐—บ๐—ฒ: Delete a branch forcefully. ๐Ÿฎ๐Ÿญ. ๐—ด๐—ถ๐˜ ๐—ฟ๐—ฒ๐˜€๐—ฒ๐˜: Undo commits by moving branch reference. ๐Ÿฎ๐Ÿฎ. ๐—ด๐—ถ๐˜ ๐—ฟ๐—ฒ๐˜ƒ๐—ฒ๐—ฟ๐˜: Undo commits by creating a new commit. ๐Ÿฎ๐Ÿฏ. ๐—ด๐—ถ๐˜ ๐—ฐ๐—ต๐—ฒ๐—ฟ๐—ฟ๐˜†-๐—ฝ๐—ถ๐—ฐ๐—ธ ๐—ฐ๐—ผ๐—บ๐—บ๐—ถ๐˜_๐—ถ๐—ฑ: Apply changes from a specific commit. ๐Ÿฎ๐Ÿฐ. ๐—ด๐—ถ๐˜ ๐—ฏ๐—ฟ๐—ฎ๐—ป๐—ฐ๐—ต: Lists branches. ๐Ÿฎ๐Ÿฑ. ๐—ด๐—ถ๐˜ ๐—ฟ๐—ฒ๐˜€๐—ฒ๐˜ --๐—ต๐—ฎ๐—ฟ๐—ฑ: Resets everything to a previous commit, erasing all uncommitted changes.
ย