How to change a Git commit message after push

To change a Git commit message after the commit has been pushed Open a terminal in the repository folder Use the interactive rebase command to retrieve the specified number of recent commit messages The list of the recent commits appears in your default text editor Replace the word pick with reword in the lines you […]

Install Git on Macintosh

Navigate to to download Git for the Macintosh. The page automatically downloads the installer for the operating system you use. This app is not trusted by Apple, so to install it Control-click (right-click) the downloaded file and select Open Click the Open button to confirm the action Configure Git To configure Git see Git configuration.

Use two GitHub accounts on the same computer

Many developers have multiple GitHub accounts. One for personal projects, and another one for their work or business. There is a way to access multiple accounts simultaneously from the same computer. Only one account at a time can be configured using the HTTP connection, but we can configure the rest of the accounts using SSH. There are […]

Add SSH key access to a GitHub repository

Generate an SSH key pair In a terminal execute ssh-keygen Generating public/private rsa key pair. Enter file in which to save the key : /Users/MY_USERNAME/Git/_Keys/MY_PROJECT/MY_PROJECT_rsa_ci Enter passphrase (empty for no passphrase): Enter same passphrase again: Leave the passphrase empty, many systems cannot work with password protected key pairs. This process will save the key-pair in […]

Install Git on Windows

If you use two-factor authentication see Create a Personal Access Token to use it as password in the command line tools at Switching to 2-factor authentication in GitHub Navigate to to download Git for Windows. The page automatically downloads the installer for the operating system you use. Install the application Accept the default values, including these: Make […]

Display all teams you belong to in GitHub

To get the information on all teams you are part of in Github Open a Terminal window Execute this command with your Personal Access Token curl -H “Authorization: token YOUR_PERSONAL_ACCESS_TOKEN” The returned JSON will display all information on the teams you belong to. To generate a personal access token See Create a Personal Access Token […]

GitKraken installation and configuration

GitKraken is a Git user interface to manage Git repositories. Installation Download the GitKraken installer from Configuration Start the GitKraken application Login with your GitHub account, or create a new account or Connect to a Git repository Click the Open a Repository button Select a repository folder and click the Open button

Custom Git Status and Git Pull commands to work with all of your repositories

If you work with many Git repositories it is easy to miss a repository when you commit your changes, and very time consuming to pull from all repositories. It is easy to automate both processes. In this example, we will place all files in the ~/Git/devops-scripts folder. If you want to place your files at another […]