Virtual Geek

Tales from real IT system administrators world and non-production environment

Part 2 Git master branch source control integration in Visual Studio Code

Part 1 Git version control integration in Visual Studio Code
Part 2 Git master branch source control integration in Visual Studio Code
Part 3 Git clone version control integration in Visual Studio Code

powershell visual studio code vscode source code version control github git branch master merge push post pull.png

Origin/Master and branches works as code snapshot/checkpoint, The default branch name in Git is origin/master (first initial commit). A branch in Git is simply a lightweight movable pointer to one of these commits. As you start making commits, you're given a master branch that points to the last commit you made. Every time you commit, the master branch pointer moves forward automatically. I will continue from my first article. I have already created first master git repository using visual studio code and git integration

bonobo git server powershell code source control vscode visual studio code devops source control desired state configuration version control.png

On the visual studio code, click on the master branch name in the bottom left side, On the popped up box select a ref to checkout, give it some name, On the option Create a new branch from, select master. As I am creating first branch, In the bottom it will switch the name to new branch name, Switching between master and braches is called checkout. You can click on the bottom left location to switch between branches and master as same as snapshots.

visual studio code vscode source control git github version control changes master head create new branch from commit stage view tree.png

As I have selected/checked out to branch now, I will delete and add new files. Stage and commit it using check button on source control activity bar, changes will occur in local repository. In the OUTPUT you can view logs what git commands are running in the background to perform the tasks.

git config show head ls-tree head master git fetch status symbolic-ref github visual studio code vscode source version control free github tutorial cbt nuggets.png

To reflect local repo changes to remote repo (upload file to and create new branch on Git server), go to menu ... 3 dots and go to push to option, Select git url as used in earlier article. It will take some time to upload files based on the files/folders size. You can switch between Master and branches and check the file changes as you use snapshot or checkpoint other virtulization softwares. In next article I will show how work and use same remote repo from another computer.

visual studio code vscode github git source version control push to add a new remote commit all amend sync pull rebase bonobo git server master branch repository browser.png


Useful Articles
Docker Error response from daemon i\o timeout internet proxy
Cannot connect to the Docker daemon at unix:var run docker.sock. Is the docker daemon running
How to install Docker on Linux
How to install Ansible on Linux for vSphere configuration
How to Setup Passwordless SSH Login on Windows
configure remote ssh extension on visual studio code

Go Back


Blog Search

Page Views


Follow me on Blogarama