In git workflow, the ideal strategy to work is to fork a new branch, make changes and finally merge in the main development branches. Over the time, this results in creation of large number of branches which are not required and becomes stale. Although a branch is just a pointer to an commit and does not require more than 40 bytes of disk space, it can be painful to search a long list of branches and deciding what you want to work on. Also since we humans are not good with creating unique names for branches, they can also result in confusion.
In git, branch is just a pointer to the one of the commits. So you can create and remove branches very easily. Most of the time, you can select commit of your choice and create a new branch from their and delete the one you do not need. However, sometime you create one branch out of master, intending to merge it to master but later everyone starts using the same and it becomes kind of master. We ran into this situation with one of the source code repository. So to get back on track, we needed to swap the contents of the both branches. Continue reading “Swap master branch with another branch in Git”→
In one of the previous blog post, we have discovered how to build GitHub project using Jenkins. In that post, since it was a public repository, we did not tried to authenticate to GitHub. Here, we’ll cover how to use SSH keys to authenticate to GitHub repos. This applies to both public and private source code repositories.
For this post’s purposes, we’ll use a sample source code repository at https://github.com/goyalmohit/DemoRepo01. You can use any repository on which you have required access. …Continue Reading
Build jobs are at the heart of Jenkins. These days GitHub has become an excellent choice for keeping source code repositories due to its features. In this blog post, we’ll cover steps required to build a GitHub project using Jenkins.
To start with, login into Jenkins admin console and go to Manage Jenkins -> Manage Plugins -> Available and then search for GitHub Plugin:
In this post, we’ll explore how to use github(https://github.com) and few basic steps such as creating repository, making some changes and commit our changes. In this age of devops, it is an essential skills to have for IT pros as well. Not that you’ll need to start writing code in .net or node.js but github is home to most open source projects even for PowerShell code. A lot of folks have moved to put their PowerShell module/scripts on github.
To get started, you’ll need to have a account on https://github.com. Once you have created an account, you can start creating project. In github terms, a repository is equivalent of a project. You would place all code belonging to project in the repository. …Continue Reading