avatar

Andres Jaimes

Common git commands

Imagine you’re a developer working on a project that’s stored in a remote Git repository. Your first step is to clone the repository using the command git clone git@github.com:some-account/some-project.git. Once you’ve cloned the repository, you can start working on a new feature by creating a new branch using the git checkout command with the -b flag and a branch name, like this: git checkout -b my-feature. This creates a new branch called my-feature and switches to it.

Installing git and connecting to GitHub on FreeBSD

Git is a popular version control system that allows developers to manage their code repositories efficiently. If you are a developer using FreeBSD, you will need to set up Git and an authentication method to start collaborating on projects with other developers. In this post, we will walk you through the process of installing Git, creating SSH keys, and cloning a project from GitHub on FreeBSD. Does this work in Linux or Mac?

Undoing the Last Git Commit

A command so important, it deserves its own page: git reset --soft HEAD~1 The previous command undoes the last commit to git. I think this is one of those commands that I have typed many times during the last year. It’s very important to know which branch we currently are on, but sometimes excitement (or stress) may make us forget checking it. If this is not enough, then we can reset our branch to master like this: (this will lose all our changes):