Satish Appalasetti’s Post

View profile for Satish Appalasetti, graphic

Immediate Joiner || DevOps | AWS | Linux | Github Actions | CI/CD | Ansible | Terraform | CDKTF | Docker | Kubernates

🚀 Master Git and GitHub: Essential Commands! 🚀 Hey LinkedIn family! 🌟 Git and GitHub are indispensable tools for developers, helping us manage our code efficiently. Whether you’re a beginner or looking to polish your skills, here’s a comprehensive guide to essential Git and GitHub commands and concepts that can streamline your workflow! 💻 🔧 𝗕𝗮𝘀𝗶𝗰 𝗚𝗶𝘁 𝗖𝗼𝗺𝗺𝗮𝗻𝗱𝘀 Initialize a Repository: 𝗴𝗶𝘁 𝗶𝗻𝗶𝘁 Clone a Repository: 𝗴𝗶𝘁 𝗰𝗹𝗼𝗻𝗲 <𝗿𝗲𝗽𝗼𝘀𝗶𝘁𝗼𝗿𝘆-𝘂𝗿𝗹> Check Status: 𝗴𝗶𝘁 𝘀𝘁𝗮𝘁𝘂𝘀 Stage Changes: 𝗴𝗶𝘁 𝗮𝗱𝗱 <𝗳𝗶𝗹𝗲> Or stage all changes: 𝗴𝗶𝘁 𝗮𝗱𝗱 . Commit Changes: git commit -m "Your commit message here" View Commit History: 𝗴𝗶𝘁 𝗹𝗼𝗴 🌐 𝗥𝗲𝗺𝗼𝘁𝗲 𝗥𝗲𝗽𝗼𝘀𝗶𝘁𝗼𝗿𝗶𝗲𝘀 Add a Remote Repository: 𝗴𝗶𝘁 𝗿𝗲𝗺𝗼𝘁𝗲 𝗮𝗱𝗱 𝗼𝗿𝗶𝗴𝗶𝗻 <𝗿𝗲𝗽𝗼𝘀𝗶𝘁𝗼𝗿𝘆-𝘂𝗿𝗹> Push Changes to Remote: 𝗴𝗶𝘁 𝗽𝘂𝘀𝗵 𝗼𝗿𝗶𝗴𝗶𝗻 <𝗯𝗿𝗮𝗻𝗰𝗵-𝗻𝗮𝗺𝗲> Pull Changes from Remote: 𝗴𝗶𝘁 𝗽𝘂𝗹𝗹 𝗼𝗿𝗶𝗴𝗶𝗻 <𝗯𝗿𝗮𝗻𝗰𝗵-𝗻𝗮𝗺𝗲> 🔄 𝗕𝗿𝗮𝗻𝗰𝗵𝗶𝗻𝗴 𝗮𝗻𝗱 𝗠𝗲𝗿𝗴𝗶𝗻𝗴 Create a New Branch: 𝗴𝗶𝘁 𝗰𝗵𝗲𝗰𝗸𝗼𝘂𝘁 -𝗯 <𝗯𝗿𝗮𝗻𝗰𝗵-𝗻𝗮𝗺𝗲> Switch to a Branch: 𝗴𝗶𝘁 𝗰𝗵𝗲𝗰𝗸𝗼𝘂𝘁 <𝗯𝗿𝗮𝗻𝗰𝗵-𝗻𝗮𝗺𝗲> Merge Branches: 𝗴𝗶𝘁 𝗺𝗲𝗿𝗴𝗲 <𝗯𝗿𝗮𝗻𝗰𝗵-𝗻𝗮𝗺𝗲> 🔐 𝗨𝘀𝗶𝗻𝗴 𝗦𝗦𝗛 𝘄𝗶𝘁𝗵 𝗚𝗶𝘁𝗛𝘂𝗯 Generate SSH Key: 𝘀𝘀𝗵-𝗸𝗲𝘆𝗴𝗲𝗻  Add SSH Key to GitHub: 𝗖𝗼𝗽𝘆 𝘁𝗵𝗲 𝗸𝗲𝘆: 𝗰𝗮𝘁 ~/.𝘀𝘀𝗵/𝗶𝗱_𝗲𝗱𝟮𝟱𝟱𝟭𝟵.𝗽𝘂𝗯 | 𝗽𝗯𝗰𝗼𝗽𝘆 Go to GitHub SSH Keys and add a new SSH key. Change Remote URL to SSH: 𝗴𝗶𝘁 𝗿𝗲𝗺𝗼𝘁𝗲 𝘀𝗲𝘁-𝘂𝗿𝗹 𝗼𝗿𝗶𝗴𝗶𝗻 𝗴𝗶𝘁@𝗴𝗶𝘁𝗵𝘂𝗯.𝗰𝗼𝗺:𝘆𝗼𝘂𝗿_𝘂𝘀𝗲𝗿𝗻𝗮𝗺𝗲/𝘆𝗼𝘂𝗿_𝗿𝗲𝗽𝗼𝘀𝗶𝘁𝗼𝗿𝘆.𝗴𝗶𝘁 Verify the SSH Connection: 𝘀𝘀𝗵 -𝗧 𝗴𝗶𝘁@𝗴𝗶𝘁𝗵𝘂𝗯.𝗰𝗼𝗺 ⚙️ 𝗖𝗼𝗻𝗳𝗶𝗴𝘂𝗿𝗮𝘁𝗶𝗼𝗻 𝗮𝗻𝗱 𝗦𝗲𝘁𝘁𝗶𝗻𝗴𝘀 Set Global Username and Email:  𝗴𝗶𝘁 𝗰𝗼𝗻𝗳𝗶𝗴 --𝗴𝗹𝗼𝗯𝗮𝗹 𝘂𝘀𝗲𝗿.𝗻𝗮𝗺𝗲 "𝗬𝗼𝘂𝗿 𝗡𝗮𝗺𝗲" 𝗴𝗶𝘁 𝗰𝗼𝗻𝗳𝗶𝗴 --𝗴𝗹𝗼𝗯𝗮𝗹 𝘂𝘀𝗲𝗿.𝗲𝗺𝗮𝗶𝗹 "𝘆𝗼𝘂𝗿_𝗲𝗺𝗮𝗶𝗹@𝗲𝘅𝗮𝗺𝗽𝗹𝗲.𝗰𝗼𝗺" Set Default Branch Name: 𝗴𝗶𝘁 𝗰𝗼𝗻𝗳𝗶𝗴 --𝗴𝗹𝗼𝗯𝗮𝗹 𝗶𝗻𝗶𝘁.𝗱𝗲𝗳𝗮𝘂𝗹𝘁𝗕𝗿𝗮𝗻𝗰𝗵 𝗺𝗮𝗶𝗻 These commands and practices will make Git and GitHub experience smoother and more efficient. 🚀 #Git #GitHub #VersionControl #Programming #DevOps #Coding #DeveloperTools #SoftwareEngineering #DevCommunity

  • No alternative text description for this image

To view or add a comment, sign in

Explore topics