Get 40-60% OFF GitKraken Pro!

DIWALI SALE

Get 60-70% OFF GitKraken Pro! Ends In

Days
Hours
Minutes
Seconds
DEEPAVALI SALE

Get 60-70% OFF GitKraken Pro! Ends In

Days
Hours
Minutes
Seconds
OFERTA DÍA DE MUERTOSAHORRA HASTA 70%Oferta Por Tiempo LimitadoComprar ahora
🪔 DIWALI SALE Claim 60-70% Off →
🪔 DEEPAVALI SALE Claim 60-70% Off →

What is a Git Repository?

Beginner Git Tutorial

Managing your repositories has never been easier on the eyes – GitKraken’s intuitive organization will ensure quick access to your Git projects.

Git Repository

A Git repository, or repo, is a project folder that Git tracks. Git stores every version of every file, plus the full commit history, in a hidden .git folder at the root of the project. If you delete that folder, your files stay, but their history is gone.

Create one: Run git init in a folder, or git clone <url> to copy an existing repo

Local repository: The copy on your computer, where you edit files and make commits

Remote repository: A hosted copy on GitHub, GitLab, Bitbucket, or Azure DevOps that your team shares

How to Create a Git Repository with GitKraken Desktop

GitKraken Desktop will create the Git repository for you when you initialize a project.

Let’s say we just created a folder in Finder or File Explorer where we plan to build out our project. Now we can open GitKraken Desktop and navigate to the folder icon in the upper left, and then select the INIT tab.

Browse for the folder previously created, and click Initialize! This action creates the .git/ folder in your project, which watches and tracks changes to your files. This also includes any new files you add, rename, or remove from the repository.

The process to create and clone Git repositories in GitKraken couldn’t be simpler, allowing Git newbies to get involved in team projects.

What is a repository in GitHub?

A GitHub repository is a Git repository hosted on GitHub. It holds the same files and commit history as your local repo, plus GitHub features like pull requests, issues, and Actions. You push commits from your local repo to GitHub, and you pull your teammates’ commits back down.

Git is the version control tool, and GitHub is a service that hosts Git repositories. Every GitHub repository is a Git repository, but a Git repository doesn’t have to live on GitHub.

initialize-repo-gitkraken

How to create a Git repository from the command line

cd my-project
git init

To connect it to a new, empty GitHub repository and push your code:

git remote add origin https://github.com/OWNER/REPO.git
git push -u origin main

To copy an existing repo instead, run git clone https://github.com/OWNER/REPO.git.

GitKraken Desktop shows your repository’s branches and commits in a visual graph, so you can see your project’s history instead of reconstructing it from the terminal. Download GitKraken Desktop free.

FAQ

Is a GitHub repository the same as a Git repository?
Yes. A GitHub repository is a Git repository stored on GitHub, with collaboration features added.

What happens if I delete the .git folder?
Your files stay, but Git loses the commit history, branches, and remote connections for the project.

Can a repository have more than one remote?
Yes. Run git remote -v to list them. A fork usually has two remotes: origin (your fork) and upstream (the original repo).

What’s the difference between a public and private repository?
Anyone can view a public repository. Only people you give access to can view a private one.

Additional Resources

Visual Studio Code is required to install GitLens.

Don’t have Visual Studio Code? Get it now.

Team Collaboration Services

Secure cloud-backed services that span across all products in the DevEx platform to keep your workflows connected across projects, repos, and team members
Launchpad – All your PRs, issues, & tasks in one spot to kick off a focused, unblocked day. Code Suggest – Real code suggestions anywhere in your project, as simple as in Google Docs. Cloud Patches – Speed up PR reviews by enabling early collaboration on work-in-progress. Workspaces – Group & sync repos to simplify multi-repo actions, & get new devs coding faster. DORA Insights – Data-driven code insights to track & improve development velocity. Security & Admin – Easily set up SSO, manage access, & streamline IdP integrations.
winget install gitkraken.cli