Questions tagged [git]

Git is an open-source distributed version control system (DVCS). Use this tag for questions about Git usage and workflows. Do not use this tag for general programming questions that happen to involve a Git repository. Do not use this tag for GitHub/GitHub Actions questions that do not involve git usage; use [github] or [github-actions] instead. Do not use the [github] tag for Git-related issues just because a repository happens to be hosted on GitHub.

Git is an open-source distributed version control system () with an emphasis on speed. was initially designed and developed by Linus Torvalds for kernel development, now it is maintained by Junio Hamano.

Every Git working directory contains a full-fledged repository with complete history and full revision tracking capabilities, not dependent on network access or a central server.

The latest stable version is 2.40.0, released on 13 March, 2023.

Characteristics

  • Strong support for non-linear development
  • Distributed development
  • Compatibility with existing systems/protocols
  • Efficient handling of large projects
  • Cryptographic authentication of history
  • Toolkit-based design
  • Pluggable merge strategies
  • Garbage accumulates unless collected
  • Periodic explicit object packing
  • Data Assurance

Data structures

git - data workflow

External Links

Internal Links

Installation/Setup

Working with the code

Tagging, branching, releases, baselines

Git Clients

  • msysgit - Cross platform, included with Git
  • gitk - Cross platform history viewer, included with Git
  • RepoZ - Zero-effort repository hub to track and access local Git repositories for Windows and macOS
  • gitnub - macOS
  • gitx - macOS history viewer
  • smartgit - Cross platform, commercial, beta
  • tig - console GUI for Linux
  • qgit - GUI for Windows, Linux
  • Git Extensions - package for Windows, includes friendly GUI
  • SourceTree - A free Git & Mercurial client for Windows or macOS
  • posh-git - A Windows PowerShell environment for Git
  • TortoiseGit - A Windows Explorer extension with overlay icons representing the file statuses in explorer
  • GitKraken - A fancy, cross-platform Git client
  • GitHub Desktop — A cross-platform client, primarily used for GitHub but works with other hosts

Other Git beginner's references

There are also good guides if you would like to understand Git conceptually or if you would like to compare other revision control software such as subversion.

Free Git hosting

Video Tutorial

Related tags

Chat

The Stack Overflow git chat is useful for coordinating work within this tag, and perhaps occasionally for getting quick help (though no guarantees can be made; attendance is spotty).

150148 questions
179
votes
5 answers

How can I see incoming commits in git?

Possible Duplicate: Using Git how do I find modified files between local and remote How can I see incoming commits in git? Or even better, see what I just git fetch/git pulled? Edit: To clarify the question: someone tells me that, to get some…
Benjamin Pollack
  • 27,594
  • 16
  • 81
  • 105
179
votes
22 answers

How do I create a readable diff of two spreadsheets using git diff?

We have a lot of spreadsheets (xls) in our source code repository. These are usually edited with gnumeric or openoffice.org, and are mostly used to populate databases for unit testing with dbUnit. There are no easy ways of doing diffs on xls files…
neu242
  • 15,796
  • 20
  • 79
  • 114
178
votes
6 answers

How to REALLY show logs of renamed files with git

I'm relatively new to Git. I used Subversion (SVN) before. I noticed that most of the graphical Git front-ends and IDE plugins don't seem to be able to display the history of a file if the file has been renamed. When I use git log --follow on the…
Mike
  • 1,931
  • 2
  • 12
  • 7
178
votes
2 answers

Git LFS track folder recursively

Is it possible to track recursively all files contained in a folder and its subfolders with Git LFS ? I would like to do something like this : git lfs track myfolder/*
csa
  • 1,806
  • 2
  • 12
  • 10
178
votes
10 answers

Keep ignored files out of git status

I would like to stop Git from showing ignored files in git status, because having tons of documentation and config files in the list of Changed but not updated files, renders the list half-useless. Is it normal for Git to show these files? I put…
knuton
  • 3,537
  • 3
  • 24
  • 23
178
votes
8 answers

What's the difference between "squash" and "fixup" in Git/Git Extension?

I've been using Git Extensions for a while now (it's awesome!) but I haven't found a simple answer to the following: Sometimes, when typing a commit message, a make a typo. My friend showed me how to fix it the following way (in Git…
Placeholder
  • 4,651
  • 6
  • 33
  • 35
177
votes
3 answers

Making 'git log' ignore changes for certain paths

How can I make git log only show commits that changed files other than the ones I specify? With git log, I can filter the commits I see to those that touch a given set of paths. What I want is to invert that filter so that only commits that touch…
Anonymoose
  • 5,662
  • 4
  • 33
  • 41
177
votes
6 answers

Use of an exclamation mark in a Git commit message via the command line

How do I enter an exclamation point into a Git commit message from the command line? It is possible to escape the exclamation point with a backslash, but then the backslash ends up in the commit message as well. I want something like this: git…
Daniel X Moore
  • 14,637
  • 17
  • 80
  • 92
177
votes
8 answers

How to git ignore ipython notebook checkpoints anywhere in repository

This is mostly a git question. I want to commit my ipython notebooks but gitignore the checkpoints. The repo has multiple folders which each have ipython notebooks, therefore just ignoring a single directory does not solve it. I want to keep adding…
sapo_cosmico
  • 6,274
  • 12
  • 45
  • 58
177
votes
17 answers

Git: Installing Git in PATH with GitHub client for Windows

How do I install Git in my PATH when using the GitHub client for Windows? I'm running into errors because apparently Git is not installed in PATH. For example, using Atom, trying to install the Linter plugin gives this error: npm ERR! not found:…
brentonstrine
  • 21,694
  • 25
  • 74
  • 120
177
votes
17 answers

git-upload-pack: command not found, when cloning remote Git repo

I have been using git to keep two copies of my project in sync, one is my local box, the other the test server. This is an issue which occurs when I log onto our remote development server using ssh; git clone…
Chris Huang-Leaver
  • 6,059
  • 6
  • 41
  • 67
177
votes
4 answers

In a git merge conflict, what are the BACKUP, BASE, LOCAL, and REMOTE files that are generated?

I assume the LOCAL and REMOTE files are just what their name suggests, but what are BASE and BACKUP for?
filler003
  • 1,879
  • 2
  • 12
  • 8
177
votes
12 answers

Delete branches in Bitbucket

I've created lots of branches in one of our repositories. Those branches are for testing before it will be pulled to the master. Now I see lots of them on the list and they we will never use it again. How to delete those branches directly to…
catherine
  • 22,492
  • 12
  • 61
  • 85
177
votes
20 answers

Homebrew’s `git` not using completion

When using OSX’s git, after I modify a file I can simply do git commit , and that’ll auto complete the file’s name to the one that was modified. However, if I install a newer version of git from homebrew and I use it, that feature no longer…
user137369
  • 5,219
  • 5
  • 31
  • 54
176
votes
10 answers

Is it possible for git-merge to ignore line-ending differences?

Is it possible for git merge to ignore line-ending differences? Maybe I'm asking the wrong question ... but: I tried uisng config.crlf input but things got a bit messy and out of control, specially when I applied it after the fact. For one thing,…
hasen
  • 161,647
  • 65
  • 194
  • 231
1 2 3
99
100