3 Git Workflows using vscode and eclipse


Even though I have been using git for the past several years, I still don’t feel like a pro when it comes to handling complex branches and merge conflicts. In this blog I will talk about three different ways of fine tuning your git workflow.

The first one is by using the vscode gui. The second one is by using the command line. The last one is by using the eclipse gui.

There are a ton of different ways to use git. The software is open-source, flexible, and has been around for over 15 years. So, it’s no surprise that there are a lot of ways to set up your workflow or the way you use git to track your changes and collaborate with others. In this short blog post I will describe three different workflows you can implement in vscode and eclipse (you should be able to get it working in any other IDE as well)

Git is a very powerful tool. However, it can feel overwhelming when you’re just getting started. There are many ways to use git effectively and this blog will cover three of them, using VSCode and Eclipse as examples.

The first method involves using git in Git Bash. This is the tried and true workflow that is familiar to most engineers, but it has some serious drawbacks. The biggest one is that Git Bash doesn’t automatically refresh its directory listings, so if you make changes in your IDE or file explorer, the changes won’t show up in Git Bash until you manually type ls and hit enter to refresh. If you’re making a lot of changes, this can be tedious.

The second method involves using the command palette in VSCode. This allows you to execute commands from the command palette instead of having to open up a terminal window and find the project directory each time you want to commit something. It’s a good solution for engineers who prefer working with a GUI over a terminal-based interface.

The third method involves using EGit in Eclipse. EGit provides a nice GUI for managing branches and commits without having to open up another terminal window or run commands from the command palette each time you want to perform an action on your codebase.

This blog is an attempt to demonstrate the various ways through which you can use git to its full capacity. All these workflows are being demonstrated on a project of mine called [vscode-guides](https://github.com/ronak99/vscode-guides).

There are many ways to manage git. I’m going to provide a brief overview of three different workflows. You can use these and other concepts in this blog to devise your own workflow and decisions on how you want to use git.

This blog is aimed at users of the VSCode IDE, but you can use these workflows with any IDE or text editor.

I’ll be using the following terms:

Committing – click the check icon in VSCode’s Source Control view.

Staging – highlight a changed file(s) in the Source Control view, right-click and select Stage Changes, then Commit.

Checkout – revert a changed file(s) to its last committed state (same as discarding changes), then Commit.

Pull – download changes from the remote repository to your local copy of the repository.

Push – upload your changes from your local repository to the remote repository (requires authentication).

Rebase – apply your commits on top of any new commits that have been pulled from the remote repository (requires authentication).

VSCode and Git are two of the most popular developer tools today. One of the most common uses for VSCode is to edit code, while one of the most common actions when using git is to commit your changes. However, committing your changes in VSCode can be a cumbersome process.

In this article we will explore three ways to commit in VSCode using git:

1)The default method that comes with VSCode: This includes the use of the built in git integration that comes with VSCode and an online git service, like GitHub or Bitbucket.

2)A modified version of the default method: This includes a third party extension called GitLens that acts as an alternative to the built in git integration provided by VSCode. An online git service, like GitHub or Bitbucket is also used.

3)An external program: This includes using a third party, desktop program called SourceTree to commit your changes. An online git service, like GitHub or Bitbucket is also utilized.

git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency.

git is easy to learn and has a tiny footprint with lightning fast performance. It outclasses SCM tools like Subversion, CVS, Perforce, and ClearCase with features like cheap local branching, convenient staging areas, and multiple workflows.

Git Workflows:

Feature Branch

Forked Repository

GitHub Flow


Leave a Reply

Your email address will not be published.