GitLab CI/CD is a part of GitLab that is used for continuous integration (CI), delivery (CD) and deployment (CD). With GitLab CI/CD, you can automatically build, test and publish your software with no third-party application or integration needed. In this note i am showing an example of how to create a new repository in GitLab […]
git
GitLab CI/CD: Print All Environment Variables
Environment variables are extremely useful as they bring a lot of flexibility to CI/CD jobs and pipelines in GitLab. There are some predefined variables that are available in every GitLab CI/CD pipeline and custom variables that can be defined in different ways. In this short note i will show how to list all the environment […]
How To Clone Git Repository In Visual Studio Code
A Visual Studio Code (VSCode) has an integrated source control management (SCM) system and supports Git out of the box. Integrated Git support is one of the greatest features of the Visual Studio Code. In this note i will show how to clone a Git repository in the Visual Studio Code.
Git Alias: Config – The Best Git Aliases
An alias in Git is a shortcut that Git translates into a full-text command. With the aliases you can avoid typing the entire text of each of the Git commands over and over again, that significantly improves the experience of working with Git from the command line. In this note i will show how to […]
Git Bash: Change Default Directory
By default the startup directory where you appear when you launch Git Bash is /, that is the installation folder of Git Bash. If you need to find out the path to /, you can run this command: $ explorer . It opens the current directory in the File Explorer so you will see the […]
Git Bash: Change Home Directory
The Home (~) directory in Git Bash can be changed by setting the user-level %HOME% environment variable in Windows. This is quite safe as the %HOME% environment variable is not normally set for Windows applications, so creating it shouldn’t affect anything else. Moreover, setting the user-level environment variable in Windows doesn’t require admin rights.
Git Bash: “Unable to get local issuer certificate”
While cloning a Git repository using Git Bash (Git for Windows), you may get an error as follows: fatal: unable to access ‘<URL>’: SSL certificate problem: unable to get local issuer certificate In this short note i will show a fast workaround of this problem and how to resolve it properly.
Git – Checkout Remote Branch
Git doesn’t allow to work on remote branches directly so you can’t literally checkout a remote branch. If you want to checkout a remote branch, you need to create your own local “copy” of that branch and then check it out. This note shows how to do this.
Git: List Remote Branches
To checkout a remote branch in Git, first of all it is required to figure out what branches exist on a remote Git repository. By default, the git branch command lists the local branches only. In this short note i’ll show how to list only remote branches in Git and also how to list all […]
Git: Detached HEAD – Go Back – [Fixed]
“You are in ‘detached HEAD’ state” is not an error message and is nothing to be worried about. This state means you are no longer on a branch, and it happens when an arbitrary commit is checked out instead of a branch. If this state was unintentional and you want to “fix” the ‘detached HEAD’, […]