Skip to content

Latest commit

 

History

History
74 lines (52 loc) · 1.21 KB

README.md

File metadata and controls

74 lines (52 loc) · 1.21 KB

Git Workflow with Visual Studio Code

1. Create a New Branch

# Create and switch to the dev branch
git checkout -b <new_branch_name>

2. Work on the Dev Branch

Make your changes in this branch.

2.1 if already in dev branch

# Switch to the dev branch
git checkout <new_branch_name>

# Fetch the latest changes from the remote dev branch and merge them into your local dev branch
git pull origin <new_branch_name>

3. Commit Your Changes

# chec the status before commit or add
git status
# Stage changes
git add .

# Commit changes
git commit -m "Your commit message"

4. Push Changes to Dev Branch

# Push changes to the remote dev branch
git push origin dev

5. Switch to the Main Branch

# Switch to the main branch
git checkout main

6. Merge Changes from Dev to Main

# Merge changes from dev to main
git merge dev

7. Push Changes to Main Branch

# Push changes to the remote main branch
git push origin main

8. Switch Back to the Dev Branch

# Switch back to the dev branch
git checkout dev

Repeat these steps as needed for your workflow. Resolve any conflicts during the merge process.