๐๐ ๐๐ฎ๐ฌ๐ญ-๐๐ง๐จ๐ฐ ๐๐ข๐ญ ๐๐จ๐ฆ๐ฆ๐๐ง๐๐ฌ ๐๐ก๐๐ญ ๐๐ซ๐ ๐ค๐ง๐จ๐ฐ๐ง ๐๐ฒ ๐๐๐ฐ๐๐ซ ๐ฉ๐๐จ๐ฉ๐ฅ๐ (newbie). ๐. ๐๐๐/๐๐จ๐ฆ๐ฆ๐ข๐ญ ๐๐ฅ๐ฅ Standard way: git add . git commit -m "Message" Another way: git commit -a -m "Message" ๐. ๐๐ฅ๐ข๐๐ฌ๐๐ฌ With aliases, you can write your own Git commands that do anything you want. Eg: git config --global alias.ac '!git add -A && git commit -m' (alias called ac, git add -A && git commit -m will do the full add and commit) ๐. ๐๐๐ฏ๐๐ซ๐ญ The revert command simply allows us to undo any commit on the current branch. Eg: git revert 486bdb2 Another way: git revert HEAD (for recent commits) ๐. ๐๐๐๐ฅ๐จ๐ This command lets you easily see the recent commits, pulls, resets, pushes, etc on your local machine. Eg: git reflog ๐. ๐๐ซ๐๐ญ๐ญ๐ฒ ๐๐จ๐ ๐ฌ Gives you the ability to print out a pretty log of your commits/branches. Eg: git log --graph --decorate --oneline ๐. ๐๐๐๐ซ๐๐ก๐ข๐ง๐ ๐๐จ๐ ๐ฌ One can also use the log command to search for specific changes in the code. Eg: git log -S "A promise in JavaScript is very similar" ๐. ๐๐ญ๐๐ฌ๐ก This command will stash (store them locally) all your code changes but does not actually commit them. Eg: git stash ๐. ๐๐๐ฆ๐จ๐ฏ๐ ๐๐๐๐ ๐๐ซ๐๐ง๐๐ก๐๐ฌ This command will delete all the tracking information for branches that are on your local machine that are not in the remote repository, but it does not delete your local branches. Eg: git remote update --prune ๐. ๐๐ข๐ฌ๐๐๐ญ For finding which commits caused certain bugs Eg: git bisect start git bisect bad git bisect good 48c86d6 ๐๐. ๐๐๐ฌ๐ญ๐ซ๐จ๐ฒ ๐๐จ๐๐๐ฅ ๐๐ก๐๐ง๐ ๐๐ฌ One can wipe out all changes on your local branch to exactly what is in the remote branch. Eg: git reset --hard origin/main ๐ Follow @rehman_coding for more daily web development tips and tricks. #content #webdev #coding #css #webdevelopment #comment #contentcreation #devcontent #frontend #frontenddevelopment #HTML #Javascript #react #codewithcoffee #grid #codewithcoffeeindia #future #share #connections #like #css3 #csstip #html #htmltip #csslayout #cssgrid #grid #cssgrid #gridlayout #terminology Ruby, etc. (at I-8 Markaz Islamabad) https://www.instagram.com/p/Coo4IHtg9Wc/?igshid=NGJjMDIxMWI=















