To make proper git based workflows, one needs to learn both branching and tagging. While we have discussed git branches in depth in previous blog posts, we have avoided tags till now. Git tags are references that point to specific points in git history. Tagging is generally used to capture a point in the history that may be utilized in future to come back to. However, tags do not change from point, where they were created. So while branches move forward, tags do not. They represent static points in git history.
Some of the examples of tag might be like v0.1, v0.2 etc. Continue reading “Working with Tags in Git”
Working with git can be a little intimidating for one since it requires a steep learning curve. Aliases are one of the ways to make git experience more familiar, simpler and easier. It is not necessary that one know them but then can often come handy. Also, you can probably save yourself some time if you also set aliases for long commands. In this short post, we’ll learn on how to use git aliases.
Before we dive into aliases, let’s review the configuration scope in git. Git has three scopes for configuration: Continue reading “Make git experience smoother using git aliases”
In previous post, we discussed about how to work with remotes in Git at command line. In this post, we are going to discuss how we can do the same from the very comforts of Visual Studio while we continue to host our source code on the GitHub. While it’s true that there is no command or built-in option available in Visual Studio to connect to GitHub, we can leverage one of the extensions available for GitHub.
Install GitHub Extension for Visual Studio
To search for this extension, let’s open Visual Studio first. From the tool bar menu, select Tools and then click on the ‘Extensions and Updates’:
Continue reading “Working with remotes in Git, GitHub and Visual Studio”
In last few posts of series of articles on the Git, we discussed several ways to work with code in our local repository. We learned about commits, branches, merge, rebase, stash and whole lot of other commands. If you want to see all those posts, just filter using Git category appearing in left pane in this site. However for most of the time, while working for an complex software, you would be working along with other developers. Therefore, you need a central place where you could host all of the source code and then you need some ability to download/upload your part of the code. This is where in the cloud-based Git repository providers like BitBucket, GitLab, GitHub, Azure Repos etc or On-Premise based Git repository providers like Azure DevOps / TFS, GitHub Enterprise , etc fits in. We already have learned the ability to segregate code for different features/issues by using concept of branches and tags. Continue reading “Work with remote in Git to share your code”
This happens almost every now and then. You are in middle of working on some code changes, modified few files here and there and may be added new files. Now something else comes up urgently and you are asked to do it now. But you do not want to make a commit in middle of the work. In such a case, if you switch branch, your changes are carried over to the another branch as well. So you need a way to save your work temporarily. Fortunately, Git allows this functionality using what is known as Git Stash.
Stashing takes the dirty state of your working directory — that is, your modified tracked files and staged changes — and saves it on a stack of unfinished changes that you can reapply at any time.
Continue reading “Save your changes temporarily in Git using Git Stash”