ShellHacks
Command-Line Tips and Tricks

git

  • Blog

Git Bash: Clear History

Posted on February 2, 2022February 1, 2022by admin

The history -cw command is used to clear a Bash history on Linux, but for some reason it doesn’t work for a Git Bash on Windows. If you try to clear the commands history in the Git Bash using this command, it won’t work – you will still see the history of the executed commands […]

Read More
No comments yet
  • Blog

Git: Show Remote URL & Check Origin

Posted on January 10, 2022by admin

Remotes in Git are simply aliases that store the URLs of repositories. By convention, an origin is the alias of the default remote repository where you publish your commits. In Git you can work with several remotes with different aliases. From this note you will find out how to show the configured remote URLs of […]

Read More
No comments yet
  • Blog

Create GitLab Project/Repository from Command Line

Posted on January 9, 2022January 6, 2022by admin

In GitLab you can create a new project/repository not only through a user interface, but also from the command line. When you create a new local Git repository and then push it to GitLab, if this repository doesn’t exit there, the corresponding project for it will be created automatically. This short note shows how to […]

Read More
2 Comments
  • Blog

Git: Show Ignored Files

Posted on January 8, 2022January 6, 2022by admin

A .gitignore file specifies the files that Git should ignore. Sometimes you may need to list all the files that Git should ignore. In this short note i will show 2 methods of how to list ignored files in Git.

Read More
No comments yet
  • Blog

GitLab CI/CD: Trigger Pipeline Manually & API

Posted on November 30, 2021November 30, 2021by admin

By default, GitLab CI/CD pipelines are executed automatically on pushing new commits to a repository and don’t require any intervention once created. However, there are also times when you need to trigger pipelines manually, without updating the project. In this note i will show how to trigger the GitLab CI/CD pipelines manually through the GitLab’s […]

Read More
No comments yet
  • Blog

GitLab CI/CD: Build Docker Image & Push to Registry

Posted on November 30, 2021November 30, 2021by admin

GitLab CI/CD can be used with Docker to build Docker images. For example, you can create a Docker image of your application and push it to a GitLab’s Container Registry. In this note i am showing an example of how to create a new repository in GitLab with a CI/CD pipeline that will be used […]

Read More
No comments yet
  • Blog

GitLab CI/CD: “Hello World” – Example

Posted on November 30, 2021January 6, 2022by admin

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 […]

Read More
No comments yet
  • Blog

GitLab CI/CD: Print All Environment Variables

Posted on November 29, 2021November 30, 2021by admin

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 […]

Read More
2 Comments
  • Blog

How To Clone Git Repository In Visual Studio Code

Posted on October 4, 2021January 18, 2022by admin

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.

Read More
1 Comment
  • Blog

Git Alias: Config – The Best Git Aliases

Posted on June 23, 2021by admin

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 […]

Read More
No comments yet

Posts navigation

Older posts

Online Tools

  • Base64 Decode
  • Base64 Encode

Tags

access-control anonymity ansible apache archive arduino artifactory aws bash boot cmd command-line curl dns docker encryption git gitlab java jenkins kubernetes linux macos mail mongodb mysql network openssl password pdf php powershell prometheus python raspberry pi ssh sublime text telegram telnet text-processing tor tsm windows wordpress yum
  • Telegram
  • Twitter
  • RSS
Privacy
Copyright © 2011-2022 | www.ShellHacks.com