DEV Community

Cover image for 𝐇𝐞𝐫𝐞 𝐚𝐫𝐞 𝐬𝐨𝐦𝐞 𝐦𝐨𝐫𝐞 𝐜𝐨𝐦𝐦𝐚𝐧𝐝𝐬 𝐟𝐨𝐫 𝐦𝐚𝐧𝐚𝐠𝐢𝐧𝐠 𝐭𝐡𝐞 𝐆𝐢𝐭
Megha Sharma
Megha Sharma

Posted on

𝐇𝐞𝐫𝐞 𝐚𝐫𝐞 𝐬𝐨𝐦𝐞 𝐦𝐨𝐫𝐞 𝐜𝐨𝐦𝐦𝐚𝐧𝐝𝐬 𝐟𝐨𝐫 𝐦𝐚𝐧𝐚𝐠𝐢𝐧𝐠 𝐭𝐡𝐞 𝐆𝐢𝐭

👉 𝐕𝐢𝐞𝐰 𝐑𝐞𝐦𝐨𝐭𝐞 𝐑𝐞𝐩𝐨𝐬𝐢𝐭𝐨𝐫𝐢𝐞𝐬
𝐠𝐢𝐭 𝐫𝐞𝐦𝐨𝐭𝐞 -𝐯 Lists the remote repositories configured for the current repository.

👉 𝐅𝐞𝐭𝐜𝐡 𝐂𝐡𝐚𝐧𝐠𝐞𝐬 𝐟𝐫𝐨𝐦 𝐑𝐞𝐦𝐨𝐭𝐞
𝐠𝐢𝐭 𝐟𝐞𝐭𝐜𝐡 Fetches changes from the remote repository without merging them into your working directory.

👉 𝐏𝐮𝐥𝐥 𝐂𝐡𝐚𝐧𝐠𝐞𝐬 𝐟𝐫𝐨𝐦 𝐑𝐞𝐦𝐨𝐭𝐞
𝐠𝐢𝐭 𝐩𝐮𝐥𝐥 𝐨𝐫𝐢𝐠𝐢𝐧 <𝐛𝐫𝐚𝐧𝐜𝐡_𝐧𝐚𝐦𝐞> Fetches changes and merges them into your local branch.

👉 𝐂𝐫𝐞𝐚𝐭𝐞 𝐚 𝐑𝐞𝐦𝐨𝐭𝐞 𝐁𝐫𝐚𝐧𝐜𝐡
𝐠𝐢𝐭 𝐩𝐮𝐬𝐡 𝐨𝐫𝐢𝐠𝐢𝐧 <𝐥𝐨𝐜𝐚𝐥_𝐛𝐫𝐚𝐧𝐜𝐡_𝐧𝐚𝐦𝐞>:<𝐫𝐞𝐦𝐨𝐭𝐞_𝐛𝐫𝐚𝐧𝐜𝐡_𝐧𝐚𝐦𝐞> Pushes a local branch to create a new remote branch.

👉 𝐔𝐧𝐝𝐨 𝐭𝐡𝐞 𝐋𝐚𝐬𝐭 𝐂𝐨𝐦𝐦𝐢𝐭
𝐠𝐢𝐭 𝐫𝐞𝐬𝐞𝐭 𝐇𝐄𝐀𝐃~1 Undoes the last commit, keeping the changes in your working directory.

👉 𝐀𝐦𝐞𝐧𝐝 𝐭𝐡𝐞 𝐋𝐚𝐬𝐭 𝐂𝐨𝐦𝐦𝐢𝐭
𝐠𝐢𝐭 𝐜𝐨𝐦𝐦𝐢𝐭 — 𝐚𝐦𝐞𝐧𝐝 Adds changes to the previous commit and allows you to edit the commit message.

👉 𝐒𝐞𝐞 𝐋𝐨𝐠 𝐨𝐟 𝐂𝐡𝐚𝐧𝐠𝐞𝐬
𝐠𝐢𝐭 𝐥𝐨𝐠 Displays the commit history.

👉 𝐒𝐞𝐞 𝐋𝐨𝐠 𝐰𝐢𝐭𝐡 𝐆𝐫𝐚𝐩𝐡𝐢𝐜𝐚𝐥 𝐑𝐞𝐩𝐫𝐞𝐬𝐞𝐧𝐭𝐚𝐭𝐢𝐨𝐧
𝐠𝐢𝐭 𝐥𝐨𝐠 — 𝐠𝐫𝐚𝐩𝐡 — 𝐨𝐧𝐞𝐥𝐢𝐧𝐞 — 𝐚𝐥𝐥 Shows a concise commit history with a graphical representation.

👉 𝐒𝐞𝐞 𝐂𝐡𝐚𝐧𝐠𝐞𝐬 𝐢𝐧 𝐖𝐨𝐫𝐤𝐢𝐧𝐠 𝐃𝐢𝐫𝐞𝐜𝐭𝐨𝐫𝐲
𝐠𝐢𝐭 𝐝𝐢𝐟𝐟 Shows changes in the working directory that are not staged.

Top comments (0)