Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
6 views1 page

Git Workflow Conclusion

The document outlines the Git workflow for setting up a new project and making regular updates. For the initial setup, it details commands to initialize a repository, connect to GitHub, and push code. After the initial setup, it provides commands for regularly staging, committing, and pushing changes to keep the repository updated.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views1 page

Git Workflow Conclusion

The document outlines the Git workflow for setting up a new project and making regular updates. For the initial setup, it details commands to initialize a repository, connect to GitHub, and push code. After the initial setup, it provides commands for regularly staging, committing, and pushing changes to keep the repository updated.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

■ Git Workflow Summary

■ 1. First-Time Setup (Initial Push)


Used when you create a new project or initialize a Git repo for the first time.
Commands:
git init
git add .
git commit -m "Initial commit"
git branch -M main
git remote add origin <your-repo-URL>
git push -u origin main
■ This step sets up your Git repository, connects it to GitHub, and pushes your
code for the first time.

✏■ 2. Regular Updates (After Initial Setup)


Used when you’ve already connected the repo and just want to push changes.
Commands:
git add .
git commit -m "Your message"
git push
■ This is your daily workflow: stage changes, commit them, and push updates to
GitHub.

■ Key Point:
• Use the first method once, when initializing the project.
• Use the second method regularly to keep your GitHub repository up to date.

You might also like