Cloning Repo Setup Workflow for New Projects

Cloning the Repo Right: My Day 1 Setup Workflow Yesterday I got added to a new project by my lead. Before touching any code, I focused on setup first. I created a local folder, opened terminal in that folder, and cloned the repo using HTTPS:   git clone https://lnkd.in/dABQE_CS   cd repo-name Then I asked my lead 3 things: - Which branch is the main/live branch? - Where should my code be merged? - What branch naming convention should I follow? Once clear, I created my feature branch from main and started working:   git checkout -b feature/your-branch-name Before pushing, I sync with latest main to reduce merge conflicts: git stash -u   git checkout main   git pull origin main   git checkout feature/your-branch-name   git stash pop   (Resolve conflicts if any)   git push origin feature/your-branch-name This small habit has saved me from last-minute PR issues multiple times. How do you handle Day 1 setup when you join a new repo? #git #github #frontenddeveloper #webdevelopment #devlife

To view or add a comment, sign in

Explore content categories