I'm relatively new to using Git and currently utilizing Git for Windows along with Visual Studio Code (VS Code) as my primary code editor. I have already partially set up source control in VS Code.
I'm seeking guidance on how to make a repo and then establish a main branch to contain my most recent working code, which I'll manage with manual commits and pushes. Additionally, I'd like to configure a test branch that automatically commits and pushes changes but not sync. Then this test branch should generate a pull request to the main branch, allowing me to review and decide whether to accept or decline the changes. Alternatively, I want the flexibility to manually push changes from the main branch after thorough testing.
A specific challenge I face is managing files and folders that need to be hidden in the main branch but remain visible in the test branch. I would like to avoid modifying the .gitignore file each time I switch branches. Perhaps there is a way to have two .gitignore files, one associated with the Test branch and another with the Main branch.
I am a complete beginner to Git. I am keen to learn how to set up this workflow in VS Code.