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.

Billboard image

Imagine monitoring that's actually built for developers

Join Vercel, CrowdStrike, and thousands of other teams that trust Checkly to streamline monitor creation and configuration with Monitoring as Code.

Start Monitoring

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

👋 Kindness is contagious

Engage with a sea of insights in this enlightening article, highly esteemed within the encouraging DEV Community. Programmers of every skill level are invited to participate and enrich our shared knowledge.

A simple "thank you" can uplift someone's spirits. Express your appreciation in the comments section!

On DEV, sharing knowledge smooths our journey and strengthens our community bonds. Found this useful? A brief thank you to the author can mean a lot.

Okay