- First Open your Visual Studio Code
![](https://www.nucleiotechnologies.com/wp-content/uploads/2022/09/2-7.png)
- Once Opened Go to the Upper Tab, Search for the Terminal, and Run the Terminal
- You can also Right Click the Project Manager and Find the “Open in Integrated Terminal” And then a Terminal would pop-out
![](https://www.nucleiotechnologies.com/wp-content/uploads/2022/09/Screenshot-2022-09-21-115630-1-1024x576.png)
![](https://www.nucleiotechnologies.com/wp-content/uploads/2022/09/Screenshot-2022-09-21-123513-2-1024x576.png)
- To check your Branch Repositories type “git branch” to show you the lists
- And if you want to move your branch from ‘master’ to ‘your_branch_name’ type “git checkout your_branch_name”
![](https://www.nucleiotechnologies.com/wp-content/uploads/2022/09/Screenshot-2022-09-21-122852-1.png)
- Here we will have an experiment of adding another file to our workspace
- A simple code would be enough
![](https://www.nucleiotechnologies.com/wp-content/uploads/2022/09/Screenshot-2022-09-27-103129-1-1024x568.png)
- With the help of VS code, we can immediately see the added file in our terminal and check if there are any changes.
- Untracked files are files created within your repo’s working directory but have not yet been added to the repository.
![](https://www.nucleiotechnologies.com/wp-content/uploads/2022/09/Screenshot-2022-09-27-103241.png)
- to add those files to your local repository type “git add (“yourfilename”)” in order to select only the files needed
- or you could just use “git add .” to add all those files
![](https://www.nucleiotechnologies.com/wp-content/uploads/2022/09/Screenshot-2022-09-27-103445.png)
- and then after adding those files don’t forget to commit and add a comment ‘-m’ as this will help you check what has been modified or added
![](https://www.nucleiotechnologies.com/wp-content/uploads/2022/09/Screenshot-2022-09-27-103644.png)
- then lastly “git push origin head” as this will push your local main branch to the branch of the same name on the remote
![](https://www.nucleiotechnologies.com/wp-content/uploads/2022/09/Screenshot-2022-09-27-104019.png)
- then to check your added files go to your GitHub and 2 branches have been added
![](https://www.nucleiotechnologies.com/wp-content/uploads/2022/09/Screenshot-2022-09-27-104112.png)
- then lastly merge the two branches and you’re done
- You’ve successfully added and modified your files to your main
![](https://www.nucleiotechnologies.com/wp-content/uploads/2022/09/Screenshot-2022-09-27-104231-1-1024x302.png)
This is the Continuation of Creating a New Branch in Github Using Visual Studio Code
References:
https://www.atlassian.com/git/tutorials/undoing-changes/git-clean#:~:text=Untracked%20files%20are%20files%20that,using%20the%20git%20add%20command.
https://www.kapwing.com/blog/how-to-rename-your-master-branch-to-main-in-git/
https://www.kahandatasolutions.com/