QuestionId stringlengths 3 8 | QuestionTitle stringlengths 15 149 | QuestionScore int64 1 27.2k | QuestionCreatedUtc stringdate 2008-08-01 18:33:08 2025-06-16 04:59:48 | QuestionBodyHtml stringlengths 40 28.2k | QuestionViewCount int64 78 16.5M | QuestionOwnerUserId float64 4 25.2M β | QuestionLastActivityUtc stringdate 2008-09-08 19:26:01 2026-01-24 22:40:25 | AcceptedAnswerId int64 266 79.7M | AnswerScore int64 2 30.1k | AnswerCreatedUtc stringdate 2008-08-01 23:40:28 2025-06-16 05:23:39 | AnswerOwnerUserId float64 1 29.5M β | AnswerLastActivityUtc stringdate 2008-08-01 23:40:28 2026-01-23 17:46:09 | QuestionLink stringlengths 31 36 | AnswerLink stringlengths 31 36 | AnswerBodyHtml stringlengths 35 33k | AnswerBodyPreview stringlengths 35 400 | AllTagIdsCsv stringlengths 2 37 | AllTagNamesCsv stringlengths 2 106 | MergedQuestion stringlengths 74 28.4k | quality_filter stringclasses 10
values | unique_id int64 0 29k | tag_major_lang stringclasses 10
values | MergedQuestion_md stringlengths 60 28.1k | AnswerBodyHtml_md stringlengths 14 29.2k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
9023928 | git add --patch with difftool | 34 | 2012-01-26 19:19:18 | <p>Is it possible to configure Git to use my configured difftool with <code>git add --patch</code>?</p>
<p>I would like to pick the changes to add to the index via my own difftool. </p>
| 4,391 | 182,703 | 2019-06-14 13:33:18 | 9,024,263 | 12 | 2012-01-26 19:46:29 | 119,963 | 2012-01-26 20:50:01 | https://stackoverflow.com/q/9023928 | https://stackoverflow.com/a/9024263 | <p>No, unfortunately.</p>
<p>I suppose I can see that working - Git generates a temporary file based on what's currently in the index, hands it to the difftool along with a copy of the current work tree version (to protect you from making further changes), lets you use the difftool to move some of the changes to the i... | <p>No, unfortunately.</p> <p>I suppose I can see that working - Git generates a temporary file based on what's currently in the index, hands it to the difftool along with a copy of the current work tree version (to protect you from making further changes), lets you use the difftool to move some of the changes to the i... | 119 | git | <h1>git add --patch with difftool</h1>
<p>Is it possible to configure Git to use my configured difftool with <code>git add --patch</code>?</p>
<p>I would like to pick the changes to add to the index via my own difftool. </p>
| q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 22,867 | git | # git add --patch with difftool
Is it possible to configure Git to use my configured difftool with `git add --patch`?
I would like to pick the changes to add to the index via my own difftool. | No, unfortunately.
I suppose I can see that working - Git generates a temporary file based on what's currently in the index, hands it to the difftool along with a copy of the current work tree version (to protect you from making further changes), lets you use the difftool to move some of the changes to the index versi... |
5991805 | how do I clone files with colons in the filename | 34 | 2011-05-13 12:26:56 | <p>When I clone the repo using msysgit, all the files with spaces in the filename are not brought down, and then show as deleted in the status. </p>
<p>The filenames looks something like this: <code>styles-ie (1:12:11 6:02 PM).css</code> so it might actually be the colon or brackets?</p>
<p>How can I fetch those fil... | 21,409 | 336,905 | 2023-11-07 07:41:54 | 5,992,912 | 12 | 2011-05-13 13:51:49 | 526,535 | 2011-05-13 13:51:49 | https://stackoverflow.com/q/5991805 | https://stackoverflow.com/a/5992912 | <p>If you try doing:</p>
<pre><code>touch "styles-ie (1:12:11 6:02 PM).css"
</code></pre>
<p>you will see that you cannot create it on Windows.</p>
<p>Basically, the repo has the file ( the blob and the tree entry ) but you cannot checkout on Windows as git would be unable to create such a file. No other way but to ... | <p>If you try doing:</p> <pre><code>touch "styles-ie (1:12:11 6:02 PM).css" </code></pre> <p>you will see that you cannot create it on Windows.</p> <p>Basically, the repo has the file ( the blob and the tree entry ) but you cannot checkout on Windows as git would be unable to create such a file. No other way but to ... | 64, 119, 1062 | filenames, git, windows | <h1>how do I clone files with colons in the filename</h1>
<p>When I clone the repo using msysgit, all the files with spaces in the filename are not brought down, and then show as deleted in the status. </p>
<p>The filenames looks something like this: <code>styles-ie (1:12:11 6:02 PM).css</code> so it might actually b... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 22,868 | git | # how do I clone files with colons in the filename
When I clone the repo using msysgit, all the files with spaces in the filename are not brought down, and then show as deleted in the status.
The filenames looks something like this: `styles-ie (1:12:11 6:02 PM).css` so it might actually be the colon or brackets?
How... | If you try doing:
```
touch "styles-ie (1:12:11 6:02 PM).css"
```
you will see that you cannot create it on Windows.
Basically, the repo has the file ( the blob and the tree entry ) but you cannot checkout on Windows as git would be unable to create such a file. No other way but to change the filename. |
39902639 | GitFlow: what is difference between release and master branches? | 33 | 2016-10-06 17:53:19 | <p>I've just took a look on <a href="http://danielkummer.github.io/git-flow-cheatsheet/" rel="noreferrer">this gitflow cheat sheet</a>. I don't understand the <code>release</code> branch.</p>
<p>Could anybody tell me the difference between <code>release</code> and <code>master</code> branches?</p>
| 31,472 | 3,227,319 | 2022-05-24 07:13:30 | 70,851,483 | 12 | 2022-01-25 15:37:52 | 1,504,556 | 2022-05-24 07:13:30 | https://stackoverflow.com/q/39902639 | https://stackoverflow.com/a/70851483 | <p>I think your question comes from a misunderstanding of GitFlow that I often see. So it is worth debunking it.</p>
<p>In GitFlow release branches are short-lived. They are used to <em>prepare</em> a release. The benefit of the release branch is it makes it possible for one team to polish the current upcoming release ... | <p>I think your question comes from a misunderstanding of GitFlow that I often see. So it is worth debunking it.</p> <p>In GitFlow release branches are short-lived. They are used to <em>prepare</em> a release. The benefit of the release branch is it makes it possible for one team to polish the current upcoming release ... | 119, 64339 | git, git-flow | <h1>GitFlow: what is difference between release and master branches?</h1>
<p>I've just took a look on <a href="http://danielkummer.github.io/git-flow-cheatsheet/" rel="noreferrer">this gitflow cheat sheet</a>. I don't understand the <code>release</code> branch.</p>
<p>Could anybody tell me the difference between <code... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 22,869 | git | # GitFlow: what is difference between release and master branches?
I've just took a look on [this gitflow cheat sheet](http://danielkummer.github.io/git-flow-cheatsheet/). I don't understand the `release` branch.
Could anybody tell me the difference between `release` and `master` branches? | I think your question comes from a misunderstanding of GitFlow that I often see. So it is worth debunking it.
In GitFlow release branches are short-lived. They are used to *prepare* a release. The benefit of the release branch is it makes it possible for one team to polish the current upcoming release while another te... |
40091541 | Can git be told to use spaces in ~/.gitconfig? | 32 | 2016-10-17 16:40:00 | <p>When I use <code>git config --global <some option> <some value></code>, Git will write the relevant entry in my <code>~/.gitconfig</code>, indented by one <strong>tab</strong>. Since <a href="https://github.com/raxod502/radian/blob/master/.gitconfig" rel="noreferrer">my <code>~/.gitconfig</code></a> is v... | 9,973 | null | 2016-10-17 20:25:55 | 40,094,388 | 12 | 2016-10-17 19:41:50 | 325,742 | 2016-10-17 20:25:55 | https://stackoverflow.com/q/40091541 | https://stackoverflow.com/a/40094388 | <p>This is what worked for me (note that as @rasjani has pointed out in a comment, there is no option to <em>prevent</em> git from inserting a tab in the first place when using <code>git config</code>.)</p>
<hr>
<h3>Create the filter</h3>
<p>Create a <code>filter</code> to convert tabs to spaces automatically as soo... | <p>This is what worked for me (note that as @rasjani has pointed out in a comment, there is no option to <em>prevent</em> git from inserting a tab in the first place when using <code>git config</code>.)</p> <hr> <h3>Create the filter</h3> <p>Create a <code>filter</code> to convert tabs to spaces automatically as soo... | 119, 5162, 8194 | git, indentation, spaces | <h1>Can git be told to use spaces in ~/.gitconfig?</h1>
<p>When I use <code>git config --global <some option> <some value></code>, Git will write the relevant entry in my <code>~/.gitconfig</code>, indented by one <strong>tab</strong>. Since <a href="https://github.com/raxod502/radian/blob/master/.gitconfig... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 22,872 | git | # Can git be told to use spaces in ~/.gitconfig?
When I use `git config --global <some option> <some value>`, Git will write the relevant entry in my `~/.gitconfig`, indented by one **tab**. Since [my `~/.gitconfig`](https://github.com/raxod502/radian/blob/master/.gitconfig) is version-controlled and I want it to not ... | This is what worked for me (note that as @rasjani has pointed out in a comment, there is no option to *prevent* git from inserting a tab in the first place when using `git config`.)
---
### Create the filter
Create a `filter` to convert tabs to spaces automatically as soon as you do a `git add` for a file. This filt... |
8243527 | Use Git dependencies with npm and Node on Heroku | 31 | 2011-11-23 14:05:38 | <p>I have this package.json file:</p>
<pre><code>{
"name": "application-name"
, "version": "0.0.1"
, "private": true
, "dependencies": {
"coffee-script": "1.1.3"
, "express": "2.5.0"
, "less": "1.1.5"
, "jade": "0.17.0"
, "connect-redis": "1.2.0"
, "hiredis": "0.1.13"
, "redis":... | 62,298 | 477,245 | 2019-02-22 13:49:03 | 8,634,612 | 12 | 2011-12-26 09:49:24 | 737,080 | 2011-12-26 09:49:24 | https://stackoverflow.com/q/8243527 | https://stackoverflow.com/a/8634612 | <p>The problem is in their nodejs buildpack. I've sent a pull request to Heroku with a fix, but I have no idea if or when they'll respond. Fortunately, there's a not-very-well documented method for using a custom buildpack, which will allow you to work around the issue. I've forked heroku's nodejs buildpack and fixe... | <p>The problem is in their nodejs buildpack. I've sent a pull request to Heroku with a fix, but I have no idea if or when they'll respond. Fortunately, there's a not-very-well documented method for using a custom buildpack, which will allow you to work around the issue. I've forked heroku's nodejs buildpack and fixe... | 119, 8279, 46426, 61387 | git, heroku, node.js, npm | <h1>Use Git dependencies with npm and Node on Heroku</h1>
<p>I have this package.json file:</p>
<pre><code>{
"name": "application-name"
, "version": "0.0.1"
, "private": true
, "dependencies": {
"coffee-script": "1.1.3"
, "express": "2.5.0"
, "less": "1.1.5"
, "jade": "0.17.0"
, "connec... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 22,873 | git | # Use Git dependencies with npm and Node on Heroku
I have this package.json file:
```
{
"name": "application-name"
, "version": "0.0.1"
, "private": true
, "dependencies": {
"coffee-script": "1.1.3"
, "express": "2.5.0"
, "less": "1.1.5"
, "jade": "0.17.0"
, "connect-redis": "1.2.0"
... | The problem is in their nodejs buildpack. I've sent a pull request to Heroku with a fix, but I have no idea if or when they'll respond. Fortunately, there's a not-very-well documented method for using a custom buildpack, which will allow you to work around the issue. I've forked heroku's nodejs buildpack and fixed the ... |
18877877 | How to automatically invoke a script before a git add? | 30 | 2013-09-18 16:46:59 | <p>Here's my use case: I commit PNGs and other stuff in my Git repo. I would like to apply a specific process to every PNGs I would like to commit and this is the result of the process I finally want to commit (the potential modified PNG).</p>
<p>At the beginning I thought about a hook (like a <code>pre-commit</code>)... | 20,734 | 984,270 | 2018-09-11 19:30:40 | 18,881,044 | 12 | 2013-09-18 19:47:14 | 717,355 | 2015-03-18 14:53:46 | https://stackoverflow.com/q/18877877 | https://stackoverflow.com/a/18881044 | <p>You may want to consider a smudge & clean filter, with the <code>clean</code> being applied during the git add, and the smudge during checkout. These can be allocated by file type. Look at the 'git attributes(5)' man page and <a href="http://git-scm.com/docs/gitattributes" rel="noreferrer">Git SCM book : Git Att... | <p>You may want to consider a smudge & clean filter, with the <code>clean</code> being applied during the git add, and the smudge during checkout. These can be allocated by file type. Look at the 'git attributes(5)' man page and <a href="http://git-scm.com/docs/gitattributes" rel="noreferrer">Git SCM book : Git Att... | 119, 853, 56102 | git, gitattributes, hook | <h1>How to automatically invoke a script before a git add?</h1>
<p>Here's my use case: I commit PNGs and other stuff in my Git repo. I would like to apply a specific process to every PNGs I would like to commit and this is the result of the process I finally want to commit (the potential modified PNG).</p>
<p>At the b... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 22,874 | git | # How to automatically invoke a script before a git add?
Here's my use case: I commit PNGs and other stuff in my Git repo. I would like to apply a specific process to every PNGs I would like to commit and this is the result of the process I finally want to commit (the potential modified PNG).
At the beginning I thoug... | You may want to consider a smudge & clean filter, with the `clean` being applied during the git add, and the smudge during checkout. These can be allocated by file type. Look at the 'git attributes(5)' man page and [Git SCM book : Git Attributes](http://git-scm.com/docs/gitattributes). |
7758128 | How to git rebase -i for a range of commits? | 28 | 2011-10-13 17:41:25 | <p>Can I squash a range of commits for a local feature/topic branch using rebase that <strong>does not include</strong> the most recent commit? This is for commits that I want to prepare before they get merged and pushed to a public repo.</p>
<p>I was working quickly and made a bunch of minor changes with poor titles... | 17,132 | 638,452 | 2011-10-13 18:55:45 | 7,759,036 | 12 | 2011-10-13 18:55:45 | 389,146 | 2011-10-13 18:55:45 | https://stackoverflow.com/q/7758128 | https://stackoverflow.com/a/7759036 | <p>You could always create a new branch with <code>git checkout -b new_branch af39283</code>, and then rebase that. However, if you want to include the later commits at some future point, there's no getting around rebasing them as well. The SHA1 for a commit depends on all its ancestor commits.</p>
| <p>You could always create a new branch with <code>git checkout -b new_branch af39283</code>, and then rebase that. However, if you want to include the later commits at some future point, there's no getting around rebasing them as well. The SHA1 for a commit depends on all its ancestor commits.</p> | 119, 5597, 8974, 29934, 76220 | commit, git, git-branch, git-rebase, rebase | <h1>How to git rebase -i for a range of commits?</h1>
<p>Can I squash a range of commits for a local feature/topic branch using rebase that <strong>does not include</strong> the most recent commit? This is for commits that I want to prepare before they get merged and pushed to a public repo.</p>
<p>I was working quic... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 22,877 | git | # How to git rebase -i for a range of commits?
Can I squash a range of commits for a local feature/topic branch using rebase that **does not include** the most recent commit? This is for commits that I want to prepare before they get merged and pushed to a public repo.
I was working quickly and made a bunch of minor ... | You could always create a new branch with `git checkout -b new_branch af39283`, and then rebase that. However, if you want to include the later commits at some future point, there's no getting around rebasing them as well. The SHA1 for a commit depends on all its ancestor commits. |
8727003 | Enhanced "ls" with git status information? | 27 | 2012-01-04 12:38:38 | <p>Is there either an existing command, or some trick or script that allows me to show the status of the files shown in "ls"? </p>
<p>Something like the following:</p>
<pre><code>$ git ls status #Command could be anything `lsg` is fine too, whatever.
app contents modified
autotest up-to-date
config ... | 5,817 | 73,673 | 2019-05-22 18:16:34 | 8,728,242 | 12 | 2012-01-04 14:10:38 | 649,852 | 2012-01-04 20:59:14 | https://stackoverflow.com/q/8727003 | https://stackoverflow.com/a/8728242 | <p>Using the Git status <a href="http://schacon.github.com/git/git-status.html#_short_format" rel="noreferrer">short format</a> information, here's a Bash script that uses Awk and the <code>column</code> command to give you customized status output.</p>
<pre><code>#!/bin/bash
git status --porcelain | \
awk 'BEGIN ... | <p>Using the Git status <a href="http://schacon.github.com/git/git-status.html#_short_format" rel="noreferrer">short format</a> information, here's a Bash script that uses Awk and the <code>column</code> command to give you customized status output.</p> <pre><code>#!/bin/bash git status --porcelain | \ awk 'BEGIN ... | 119 | git | <h1>Enhanced "ls" with git status information?</h1>
<p>Is there either an existing command, or some trick or script that allows me to show the status of the files shown in "ls"? </p>
<p>Something like the following:</p>
<pre><code>$ git ls status #Command could be anything `lsg` is fine too, whatever.
app ... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 22,878 | git | # Enhanced "ls" with git status information?
Is there either an existing command, or some trick or script that allows me to show the status of the files shown in "ls"?
Something like the following:
```
$ git ls status #Command could be anything `lsg` is fine too, whatever.
app contents modified
autotest ... | Using the Git status [short format](http://schacon.github.com/git/git-status.html#_short_format) information, here's a Bash script that uses Awk and the `column` command to give you customized status output.
```
#!/bin/bash
git status --porcelain | \
awk 'BEGIN {FS=" "}
{
xstat = substr($0, 1, 1);
ystat = ... |
23874208 | How can I ignore committing timezone information in my commit? | 26 | 2014-05-26 16:18:51 | <p>Recently, I forked a repository hosted by github, with contributors spreading all over the world, and found out that the each commit log contains committer's timezone information.</p>
<pre><code>2013-11-07 02:31:41 +0545 <-- This committer is living in Nepal. Surely.
2013-11-04 12:58:36 -0600 <-- This committ... | 6,280 | 934,437 | 2024-11-18 12:24:31 | 26,085,024 | 12 | 2014-09-28 12:52:22 | 68,080 | 2017-02-04 08:11:05 | https://stackoverflow.com/q/23874208 | https://stackoverflow.com/a/26085024 | <p>You can use this command to commit in UTC time:</p>
<pre><code>git commit --date="`date --utc +%Y-%m-%dT%H:%M:%S%z`"
</code></pre>
<p>You can also alias it to a convenient name:</p>
<pre><code>git config --global alias.commitutc '!git commit --date="$(date --utc +%Y-%m-%dT%H:%M:%S%z)"'
</code></pre>
<p>And do <c... | <p>You can use this command to commit in UTC time:</p> <pre><code>git commit --date="`date --utc +%Y-%m-%dT%H:%M:%S%z`" </code></pre> <p>You can also alias it to a convenient name:</p> <pre><code>git config --global alias.commitutc '!git commit --date="$(date --utc +%Y-%m-%dT%H:%M:%S%z)"' </code></pre> <p>And do <c... | 119, 982, 5002 | date, git, timezone | <h1>How can I ignore committing timezone information in my commit?</h1>
<p>Recently, I forked a repository hosted by github, with contributors spreading all over the world, and found out that the each commit log contains committer's timezone information.</p>
<pre><code>2013-11-07 02:31:41 +0545 <-- This committer i... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 22,879 | git | # How can I ignore committing timezone information in my commit?
Recently, I forked a repository hosted by github, with contributors spreading all over the world, and found out that the each commit log contains committer's timezone information.
```
2013-11-07 02:31:41 +0545 <-- This committer is living in Nepal. Sure... | You can use this command to commit in UTC time:
```
git commit --date="`date --utc +%Y-%m-%dT%H:%M:%S%z`"
```
You can also alias it to a convenient name:
```
git config --global alias.commitutc '!git commit --date="$(date --utc +%Y-%m-%dT%H:%M:%S%z)"'
```
And do `git commitutc`.
For a more detailed explanation tak... |
9448682 | Git submodule on remote bare | 26 | 2012-02-25 22:29:45 | <p>I've setup my environment so I can push to a remote bare repository. I used these commands to set up the remote repository:</p>
<pre><code>$ mkdir ~/website.git && cd ~/website.git
$ git init --bare
</code></pre>
<p>And</p>
<pre><code>$ cat > hooks/post-receive
#!/bin/sh
GIT_WORK_TREE=/var/www/website g... | 16,312 | 259,764 | 2020-01-31 02:33:20 | 9,448,794 | 12 | 2012-02-25 22:46:14 | 6,309 | 2018-04-28 18:55:18 | https://stackoverflow.com/q/9448682 | https://stackoverflow.com/a/9448794 | <p>One possible way might be:</p>
<ul>
<li>to setup <code>/var/www/website</code> as a (non-bare) repo</li>
<li>have your <code>post-receive</code> hook of your bare repo:
<ul>
<li>set <code>GIT_DIR</code> and <code>GIT_WORK_TREE</code> to the non-bare repo at <code>/var/www/website</code></li>
<li><code>cd /var/ww/w... | <p>One possible way might be:</p> <ul> <li>to setup <code>/var/www/website</code> as a (non-bare) repo</li> <li>have your <code>post-receive</code> hook of your bare repo: <ul> <li>set <code>GIT_DIR</code> and <code>GIT_WORK_TREE</code> to the non-bare repo at <code>/var/www/website</code></li> <li><code>cd /var/ww/w... | 119, 41612, 64465 | git, git-bare, git-submodules | <h1>Git submodule on remote bare</h1>
<p>I've setup my environment so I can push to a remote bare repository. I used these commands to set up the remote repository:</p>
<pre><code>$ mkdir ~/website.git && cd ~/website.git
$ git init --bare
</code></pre>
<p>And</p>
<pre><code>$ cat > hooks/post-receive
#!/b... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 22,880 | git | # Git submodule on remote bare
I've setup my environment so I can push to a remote bare repository. I used these commands to set up the remote repository:
```
$ mkdir ~/website.git && cd ~/website.git
$ git init --bare
```
And
```
$ cat > hooks/post-receive
#!/bin/sh
GIT_WORK_TREE=/var/www/website git checkout -f
... | One possible way might be:
- to setup `/var/www/website` as a (non-bare) repo
- have your `post-receive` hook of your bare repo:
- set `GIT_DIR` and `GIT_WORK_TREE` to the non-bare repo at `/var/www/website`
- `cd /var/ww/website`
- `git pull ~/website`
- `git submodule update` (a bit like in "[How do I init/u... |
66862358 | git fatal error: Unsupported SSL backend 'schannel' | 25 | 2021-03-29 22:16:19 | <p><em><strong>Note</strong>, this question was meant for Using <strong>Git Bash</strong> under <strong>WSL</strong> under <strong>Windows</strong> for the MS TFS Git server, and I am still not clear what environment the top voted answer is under, so I'm still keeping my chosen answer as the answer.</em></p>
<p>Trying ... | 82,204 | 2,125,837 | 2025-01-08 15:19:42 | 66,863,477 | 12 | 2021-03-30 00:58:00 | 8,705,432 | 2021-03-30 00:58:00 | https://stackoverflow.com/q/66862358 | https://stackoverflow.com/a/66863477 | <p>In general, the <code>http.sslBackend</code> option is only usable on Windows. Most Linux distros don't offer it as an option, since they don't compile with multiple TLS libraries.</p>
<p>The proper solution is to remove all of the <code>http.sslBackend</code> options:</p>
<pre><code>$ git config --unset-all http.s... | <p>In general, the <code>http.sslBackend</code> option is only usable on Windows. Most Linux distros don't offer it as an option, since they don't compile with multiple TLS libraries.</p> <p>The proper solution is to remove all of the <code>http.sslBackend</code> options:</p> <pre><code>$ git config --unset-all http.s... | 119, 725, 119526 | configuration, git, windows-subsystem-for-linux | <h1>git fatal error: Unsupported SSL backend 'schannel'</h1>
<p><em><strong>Note</strong>, this question was meant for Using <strong>Git Bash</strong> under <strong>WSL</strong> under <strong>Windows</strong> for the MS TFS Git server, and I am still not clear what environment the top voted answer is under, so I'm stil... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 22,881 | git | # git fatal error: Unsupported SSL backend 'schannel'
***Note**, this question was meant for Using **Git Bash** under **WSL** under **Windows** for the MS TFS Git server, and I am still not clear what environment the top voted answer is under, so I'm still keeping my chosen answer as the answer.*
Trying to access `gi... | In general, the `http.sslBackend` option is only usable on Windows. Most Linux distros don't offer it as an option, since they don't compile with multiple TLS libraries.
The proper solution is to remove all of the `http.sslBackend` options:
```
$ git config --unset-all http.sslBackend
```
If you must use OpenSSL for... |
62177166 | How to do git commit using personal access token? | 25 | 2020-06-03 15:52:39 | <p>I made all permission reserved personal access token on github.</p>
<p>I saw that</p>
<pre><code>git clone https://<username>:<personal_access_token>@github.com/<username>/<project_name>.git
</code></pre>
<p>works.</p>
<p>So How can I clone, commit, and push using personal access tokens?</p>
... | 59,296 | 6,426,449 | 2021-09-01 07:55:55 | 62,184,716 | 12 | 2020-06-04 00:02:36 | 8,705,432 | 2020-06-04 00:02:36 | https://stackoverflow.com/q/62177166 | https://stackoverflow.com/a/62184716 | <p>While it is possible to use the personal access token in the URL like that, it's discouraged because (a) it stores your token in plaintext where it can be read and printed and (b) because it means you have to enter it for each repository.</p>
<p>It's better to use a credential manager to store your credentials by s... | <p>While it is possible to use the personal access token in the URL like that, it's discouraged because (a) it stores your token in plaintext where it can be read and printed and (b) because it means you have to enter it for each repository.</p> <p>It's better to use a credential manager to store your credentials by s... | 119 | git | <h1>How to do git commit using personal access token?</h1>
<p>I made all permission reserved personal access token on github.</p>
<p>I saw that</p>
<pre><code>git clone https://<username>:<personal_access_token>@github.com/<username>/<project_name>.git
</code></pre>
<p>works.</p>
<p>So How can I... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 22,882 | git | # How to do git commit using personal access token?
I made all permission reserved personal access token on github.
I saw that
```
git clone https://<username>:<personal_access_token>@github.com/<username>/<project_name>.git
```
works.
So How can I clone, commit, and push using personal access tokens?
Like this
... | While it is possible to use the personal access token in the URL like that, it's discouraged because (a) it stores your token in plaintext where it can be read and printed and (b) because it means you have to enter it for each repository.
It's better to use a credential manager to store your credentials by setting `cr... |
57328341 | How to restore linear git history after nonlinear merge? | 25 | 2019-08-02 14:20:31 | <p>Few commits ago I accidentally did a nonlinear merge in my master branch. I have a habit of always trying to keep a linear history, so now I would like to restore the linearity.</p>
<p>Here's the output of <code>git log --oneline --graph --date-order</code>:</p>
<pre><code>* 88a4b7e (HEAD -> master, origin/master... | 6,467 | 9,835,872 | 2024-06-25 03:16:30 | 60,277,828 | 12 | 2020-02-18 09:40:10 | 9,835,872 | 2021-02-16 09:32:33 | https://stackoverflow.com/q/57328341 | https://stackoverflow.com/a/60277828 | <p>Perhaps the simplest way this can be done is to "abuse" the default behavior of <code>git rebase</code>. That is, without explicitly passing <a href="https://git-scm.com/docs/git-rebase#Documentation/git-rebase.txt--r" rel="noreferrer"><code>--rebase-merges</code></a> to <code>git rebase</code>, it will ac... | <p>Perhaps the simplest way this can be done is to "abuse" the default behavior of <code>git rebase</code>. That is, without explicitly passing <a href="https://git-scm.com/docs/git-rebase#Documentation/git-rebase.txt--r" rel="noreferrer"><code>--rebase-merges</code></a> to <code>git rebase</code>, it will ac... | 119, 28897, 29934, 91259 | git, git-merge, git-rebase, git-rewrite-history | <h1>How to restore linear git history after nonlinear merge?</h1>
<p>Few commits ago I accidentally did a nonlinear merge in my master branch. I have a habit of always trying to keep a linear history, so now I would like to restore the linearity.</p>
<p>Here's the output of <code>git log --oneline --graph --date-order<... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 22,883 | git | # How to restore linear git history after nonlinear merge?
Few commits ago I accidentally did a nonlinear merge in my master branch. I have a habit of always trying to keep a linear history, so now I would like to restore the linearity.
Here's the output of `git log --oneline --graph --date-order`:
```
* 88a4b7e (HE... | Perhaps the simplest way this can be done is to "abuse" the default behavior of `git rebase`. That is, without explicitly passing [`--rebase-merges`](https://git-scm.com/docs/git-rebase#Documentation/git-rebase.txt--r) to `git rebase`, it will actually remove all merge commits from the history. This allows us to get th... |
18912350 | Git - resolve conflicts partially and send changes to somebody else to finish solving | 25 | 2013-09-20 08:43:06 | <p>I would like to know if there is a way to solve some conflicts (caused by merge or rebase) and send it to another person who will solve the rest of conflicts.
It sometimes happens, eg. you work on a branch you derived and when it comes to merging it may me better if the person responsible for merging those particula... | 5,286 | 2,618,392 | 2013-11-18 01:22:36 | 18,924,953 | 12 | 2013-09-20 20:04:18 | 498,699 | 2013-09-20 20:04:18 | https://stackoverflow.com/q/18912350 | https://stackoverflow.com/a/18924953 | <p>The conflicts are being resolved locally on your repo. You would have to provide the other individual access to your local directly (sitting at your machine, copying the files to a usb, etc). You can't resolve some conflicts and leave the rest for someone else to resolve (I can see that leading to conflicts not be... | <p>The conflicts are being resolved locally on your repo. You would have to provide the other individual access to your local directly (sitting at your machine, copying the files to a usb, etc). You can't resolve some conflicts and leave the rest for someone else to resolve (I can see that leading to conflicts not be... | 119, 3146 | conflict, git | <h1>Git - resolve conflicts partially and send changes to somebody else to finish solving</h1>
<p>I would like to know if there is a way to solve some conflicts (caused by merge or rebase) and send it to another person who will solve the rest of conflicts.
It sometimes happens, eg. you work on a branch you derived and ... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 22,885 | git | # Git - resolve conflicts partially and send changes to somebody else to finish solving
I would like to know if there is a way to solve some conflicts (caused by merge or rebase) and send it to another person who will solve the rest of conflicts.
It sometimes happens, eg. you work on a branch you derived and when it c... | The conflicts are being resolved locally on your repo. You would have to provide the other individual access to your local directly (sitting at your machine, copying the files to a usb, etc). You can't resolve some conflicts and leave the rest for someone else to resolve (I can see that leading to conflicts not being r... |
12895980 | Git avoiding "merge branch master" | 24 | 2012-10-15 12:47:37 | <p>A colleague and I are using git with a single remote origin repository.
We both Commit local then push to origin. As we are working there is naturally some divergence.</p>
<p>Once its time to push to origin i would suspect we can merge local, then push to origin.
I anticipated to get a rather straight version histor... | 8,256 | 233,632 | 2020-01-17 15:04:47 | 12,896,111 | 12 | 2012-10-15 12:55:55 | 613,064 | 2012-10-15 13:55:28 | https://stackoverflow.com/q/12895980 | https://stackoverflow.com/a/12896111 | <p>I think you are looking for <code>git rebase</code>.</p>
<p>Each of the merges recorded in your history was required from the "preserve true history" point of view. Your branches diverged at this point, and were subsequently merged (note how both branches have commits unique to them, so fast-forwarding isn't possib... | <p>I think you are looking for <code>git rebase</code>.</p> <p>Each of the merges recorded in your history was required from the "preserve true history" point of view. Your branches diverged at this point, and were subsequently merged (note how both branches have commits unique to them, so fast-forwarding isn't possib... | 119, 28897 | git, git-merge | <h1>Git avoiding "merge branch master"</h1>
<p>A colleague and I are using git with a single remote origin repository.
We both Commit local then push to origin. As we are working there is naturally some divergence.</p>
<p>Once its time to push to origin i would suspect we can merge local, then push to origin.
I anticip... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 22,888 | git | # Git avoiding "merge branch master"
A colleague and I are using git with a single remote origin repository.
We both Commit local then push to origin. As we are working there is naturally some divergence.
Once its time to push to origin i would suspect we can merge local, then push to origin.
I anticipated to get a r... | I think you are looking for `git rebase`.
Each of the merges recorded in your history was required from the "preserve true history" point of view. Your branches diverged at this point, and were subsequently merged (note how both branches have commits unique to them, so fast-forwarding isn't possible.
If you rebase, t... |
11127771 | Automatically skip empty commits when using git rebase | 23 | 2012-06-20 20:36:11 | <p>Usually, you have to do <code>git rebase --skip</code>, it would be nice if there was a switch to automatically skip over these empty commits. Anyone know how to do this? </p>
| 6,728 | 1,397,097 | 2022-02-25 21:58:17 | 71,272,124 | 12 | 2022-02-25 21:58:17 | 9,147,033 | 2022-02-25 21:58:17 | https://stackoverflow.com/q/11127771 | https://stackoverflow.com/a/71272124 | <p>Very old topic, but for me was the first result on the search engine.</p>
<p>I finally found there is a <code>--empty</code> parameter that can take one of the following values: keep, drop, and ask.</p>
<p>Link to the documentation:
<a href="https://git-scm.com/docs/git-rebase#Documentation/git-rebase.txt---emptydro... | <p>Very old topic, but for me was the first result on the search engine.</p> <p>I finally found there is a <code>--empty</code> parameter that can take one of the following values: keep, drop, and ask.</p> <p>Link to the documentation: <a href="https://git-scm.com/docs/git-rebase#Documentation/git-rebase.txt---emptydro... | 119, 29934 | git, git-rebase | <h1>Automatically skip empty commits when using git rebase</h1>
<p>Usually, you have to do <code>git rebase --skip</code>, it would be nice if there was a switch to automatically skip over these empty commits. Anyone know how to do this? </p>
| q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 22,889 | git | # Automatically skip empty commits when using git rebase
Usually, you have to do `git rebase --skip`, it would be nice if there was a switch to automatically skip over these empty commits. Anyone know how to do this? | Very old topic, but for me was the first result on the search engine.
I finally found there is a `--empty` parameter that can take one of the following values: keep, drop, and ask.
Link to the documentation:
<https://git-scm.com/docs/git-rebase#Documentation/git-rebase.txt---emptydropkeepask>
So you now can simply d... |
32186600 | How to make git-config to use spaces instead of tabs | 23 | 2015-08-24 15:54:08 | <p>When I use git-config to edit my .gitconfig file, it inserts tabs. Is there a way to make it insert spaces instead of tabs? </p>
<p>(The motivation is that when I hand-edit the file, I always insert spaces. Git's use of tabs makes the file inconsistent. Of course I could just use tabs myself, but that's just ridicu... | 1,397 | 1,272,103 | 2023-01-10 04:29:52 | 42,401,876 | 12 | 2017-02-22 20:43:01 | 54,249 | 2023-01-10 04:29:52 | https://stackoverflow.com/q/32186600 | https://stackoverflow.com/a/42401876 | <p>This was answered above in a comment by @Wolf, but to reiterate: this is hard-coded in Git's <a href="https://github.com/git/git/blame/a38d39a4c50d1275833aba54c4dbdfce9e2e9ca1/config.c#L3031" rel="nofollow noreferrer"><code>write_pair</code></a> (formerly <a href="https://github.com/git/git/blame/80ba04ed9b07c34af9c... | <p>This was answered above in a comment by @Wolf, but to reiterate: this is hard-coded in Git's <a href="https://github.com/git/git/blame/a38d39a4c50d1275833aba54c4dbdfce9e2e9ca1/config.c#L3031" rel="nofollow noreferrer"><code>write_pair</code></a> (formerly <a href="https://github.com/git/git/blame/80ba04ed9b07c34af9c... | 119 | git | <h1>How to make git-config to use spaces instead of tabs</h1>
<p>When I use git-config to edit my .gitconfig file, it inserts tabs. Is there a way to make it insert spaces instead of tabs? </p>
<p>(The motivation is that when I hand-edit the file, I always insert spaces. Git's use of tabs makes the file inconsistent. ... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 22,892 | git | # How to make git-config to use spaces instead of tabs
When I use git-config to edit my .gitconfig file, it inserts tabs. Is there a way to make it insert spaces instead of tabs?
(The motivation is that when I hand-edit the file, I always insert spaces. Git's use of tabs makes the file inconsistent. Of course I could... | This was answered above in a comment by @Wolf, but to reiterate: this is hard-coded in Git's [`write_pair`](https://github.com/git/git/blame/a38d39a4c50d1275833aba54c4dbdfce9e2e9ca1/config.c#L3031) (formerly [`store_write_pair`](https://github.com/git/git/blame/80ba04ed9b07c34af9cc644f2183b3b80fd81744/config.c#L1918-L1... |
7083272 | What does "fatal: You are on a branch yet to be born" mean in this context | 23 | 2011-08-16 18:38:45 | <p>I was migrating a svn repo to git. I created a clean temp dir, used git svn init to get stuff in there and then added the remote and pushed it. Now on the other actual source dir (which I had cloned from the empty repo before committing stuff from svn) I did a fetch. And then I did a checkout and got above message.... | 36,833 | 608,128 | 2017-11-10 14:50:44 | 7,083,386 | 12 | 2011-08-16 18:47:20 | 275,354 | 2011-08-16 19:08:00 | https://stackoverflow.com/q/7083272 | https://stackoverflow.com/a/7083386 | <p>I believe it was because your fetch, which only fetches remote refs and commits, didn't give you a local <em>master</em> branch to checkout. Since you were in an empty repo, you were never on a branch, so your <code>git checkout</code> had no <em>master</em> branch to go to. </p>
<p>You could directly checkout th... | <p>I believe it was because your fetch, which only fetches remote refs and commits, didn't give you a local <em>master</em> branch to checkout. Since you were in an empty repo, you were never on a branch, so your <code>git checkout</code> had no <em>master</em> branch to go to. </p> <p>You could directly checkout th... | 119, 37230 | git, git-checkout | <h1>What does "fatal: You are on a branch yet to be born" mean in this context</h1>
<p>I was migrating a svn repo to git. I created a clean temp dir, used git svn init to get stuff in there and then added the remote and pushed it. Now on the other actual source dir (which I had cloned from the empty repo before committ... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 22,893 | git | # What does "fatal: You are on a branch yet to be born" mean in this context
I was migrating a svn repo to git. I created a clean temp dir, used git svn init to get stuff in there and then added the remote and pushed it. Now on the other actual source dir (which I had cloned from the empty repo before committing stuff... | I believe it was because your fetch, which only fetches remote refs and commits, didn't give you a local *master* branch to checkout. Since you were in an empty repo, you were never on a branch, so your `git checkout` had no *master* branch to go to.
You could directly checkout the remote master by explicitly naming i... |
487753 | How to realise a deployment branch in Git | 23 | 2009-01-28 14:13:38 | <p>I'm using git for a PHP project, I think it's really handy. There is one thing that would be great if I get it to work.</p>
<p>I have created a branch, meant for deployment. It has some differences, like different configuration files and documentation.</p>
<p>I can't just ignore them, because then they will stay i... | 26,213 | 20,261 | 2022-07-12 03:38:35 | 487,788 | 12 | 2009-01-28 14:23:05 | 6,309 | 2021-02-17 19:40:59 | https://stackoverflow.com/q/487753 | https://stackoverflow.com/a/487788 | <p>Update Feb. 2021: Git itself is still not a good fit, but <a href="https://stackoverflow.com/a/66248867/6309">GitHub Action environment could help</a>.</p>
<p>2009: I am not sure Git is meant to be used this way.</p>
<p>First a quick <a href="http://www.gelato.unsw.edu.au/archives/git/0701/37960.html" rel="nofollow ... | <p>Update Feb. 2021: Git itself is still not a good fit, but <a href="https://stackoverflow.com/a/66248867/6309">GitHub Action environment could help</a>.</p> <p>2009: I am not sure Git is meant to be used this way.</p> <p>First a quick <a href="http://www.gelato.unsw.edu.au/archives/git/0701/37960.html" rel="nofollow ... | 119, 190, 1879 | branch, deployment, git | <h1>How to realise a deployment branch in Git</h1>
<p>I'm using git for a PHP project, I think it's really handy. There is one thing that would be great if I get it to work.</p>
<p>I have created a branch, meant for deployment. It has some differences, like different configuration files and documentation.</p>
<p>I ca... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 22,894 | git | # How to realise a deployment branch in Git
I'm using git for a PHP project, I think it's really handy. There is one thing that would be great if I get it to work.
I have created a branch, meant for deployment. It has some differences, like different configuration files and documentation.
I can't just ignore them, b... | Update Feb. 2021: Git itself is still not a good fit, but [GitHub Action environment could help](https://stackoverflow.com/a/66248867/6309).
2009: I am not sure Git is meant to be used this way.
First a quick [Linus advice](http://www.gelato.unsw.edu.au/archives/git/0701/37960.html), always "colorful" and informative... |
66631444 | How do I resolve .husky/_/husky.sh: No such file or directory error? | 22 | 2021-03-15 01:56:58 | <p>A project that I'm working on with colleagues uses husky versions ^5.1.0 and I keep getting this error when I'm trying to push my commit.</p>
<pre><code>.husky/_/husky.sh: No such file or directory
</code></pre>
<p>How do I resolve this?</p>
<p>I'm currently using git version 2.18.0.</p>
<p>I have referred to:</p>
<... | 19,159 | 5,275,954 | 2025-12-18 03:11:51 | 66,631,445 | 12 | 2021-03-15 01:56:58 | 5,275,954 | 2024-09-20 05:28:57 | https://stackoverflow.com/q/66631444 | https://stackoverflow.com/a/66631445 | <p>I solved the issue by deleting <code>node_modules</code> and running:</p>
<pre><code>yarn install
</code></pre>
<p>However, this added <code>.husky/_/husky.sh</code> to the commit, which my colleagues didn't want. To fix this, I updated Git via Homebrew:</p>
<pre><code>brew update && brew upgrade
</code></pr... | <p>I solved the issue by deleting <code>node_modules</code> and running:</p> <pre><code>yarn install </code></pre> <p>However, this added <code>.husky/_/husky.sh</code> to the commit, which my colleagues didn't want. To fix this, I updated Git via Homebrew:</p> <pre><code>brew update && brew upgrade </code></pr... | 119, 124263, 130301 | git, git-husky, husky | <h1>How do I resolve .husky/_/husky.sh: No such file or directory error?</h1>
<p>A project that I'm working on with colleagues uses husky versions ^5.1.0 and I keep getting this error when I'm trying to push my commit.</p>
<pre><code>.husky/_/husky.sh: No such file or directory
</code></pre>
<p>How do I resolve this?</... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 22,895 | git | # How do I resolve .husky/_/husky.sh: No such file or directory error?
A project that I'm working on with colleagues uses husky versions ^5.1.0 and I keep getting this error when I'm trying to push my commit.
```
.husky/_/husky.sh: No such file or directory
```
How do I resolve this?
I'm currently using git version... | I solved the issue by deleting `node_modules` and running:
```
yarn install
```
However, this added `.husky/_/husky.sh` to the commit, which my colleagues didn't want. To fix this, I updated Git via Homebrew:
```
brew update && brew upgrade
```
This updated Git to version 2.30.2, which allowed the nested `.gitignor... |
6257260 | Use vimdiff to replace entire file? | 22 | 2011-06-06 19:51:39 | <p>I'm using vimdiff for a git merge. Is there a quick way to select 1 file to use, right now i'm just selecting everything from one buffer, replacing the $MERGE with that, and then saving. I guess I can macro that, but was wondering if there is a better way.
Thanks!</p>
| 14,641 | 763,116 | 2020-07-05 15:49:34 | 6,260,060 | 12 | 2011-06-07 02:23:55 | 562,692 | 2011-06-07 02:23:55 | https://stackoverflow.com/q/6257260 | https://stackoverflow.com/a/6260060 | <p>You should take a look at <a href="http://www.vim.org/scripts/script.php?script_id=2975">Tim Pope's Fugitive plugin</a>. It's a really usefull plugin.</p>
<p>When you run <code>Gdiff</code> in a conflicted file, 3 files are opened - target, merged and working copy. You would switch to the file you want to save, and... | <p>You should take a look at <a href="http://www.vim.org/scripts/script.php?script_id=2975">Tim Pope's Fugitive plugin</a>. It's a really usefull plugin.</p> <p>When you run <code>Gdiff</code> in a conflicted file, 3 files are opened - target, merged and working copy. You would switch to the file you want to save, and... | 370, 717, 2605, 28897 | git-merge, merge, vim, vimdiff | <h1>Use vimdiff to replace entire file?</h1>
<p>I'm using vimdiff for a git merge. Is there a quick way to select 1 file to use, right now i'm just selecting everything from one buffer, replacing the $MERGE with that, and then saving. I guess I can macro that, but was wondering if there is a better way.
Thanks!</p>
| q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 22,896 | git | # Use vimdiff to replace entire file?
I'm using vimdiff for a git merge. Is there a quick way to select 1 file to use, right now i'm just selecting everything from one buffer, replacing the $MERGE with that, and then saving. I guess I can macro that, but was wondering if there is a better way.
Thanks! | You should take a look at [Tim Pope's Fugitive plugin](http://www.vim.org/scripts/script.php?script_id=2975). It's a really usefull plugin.
When you run `Gdiff` in a conflicted file, 3 files are opened - target, merged and working copy. You would switch to the file you want to save, and execute `Gwrite!` to save that ... |
26304941 | Follow renames when performing git subtree split | 21 | 2014-10-10 17:29:56 | <p>I have a number of subdirectories that I want to pull out into a separate repo. In order to extract these with a single command I move (rename) them to a single subdirectory inside the root.</p>
<p>I then run: <code>git subtree split -P my_new_subdir -b newbranch</code></p>
<p>If I then checkout this new branch an... | 2,177 | 324,284 | 2015-03-05 14:25:56 | 28,880,148 | 12 | 2015-03-05 14:25:56 | 3,021,889 | 2015-03-05 14:25:56 | https://stackoverflow.com/q/26304941 | https://stackoverflow.com/a/28880148 | <p>Actually it is possible and this issue has been raised here few times although there is no universal way and it looks like you have to compose your own recipe.</p>
<p>If you want just to leave files from <code>my_new_subdir</code> you need actually to remove all other files by your own. The concept is to use:</p>
... | <p>Actually it is possible and this issue has been raised here few times although there is no universal way and it looks like you have to compose your own recipe.</p> <p>If you want just to leave files from <code>my_new_subdir</code> you need actually to remove all other files by your own. The concept is to use:</p> ... | 119, 68200 | git, git-subtree | <h1>Follow renames when performing git subtree split</h1>
<p>I have a number of subdirectories that I want to pull out into a separate repo. In order to extract these with a single command I move (rename) them to a single subdirectory inside the root.</p>
<p>I then run: <code>git subtree split -P my_new_subdir -b newb... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 22,898 | git | # Follow renames when performing git subtree split
I have a number of subdirectories that I want to pull out into a separate repo. In order to extract these with a single command I move (rename) them to a single subdirectory inside the root.
I then run: `git subtree split -P my_new_subdir -b newbranch`
If I then che... | Actually it is possible and this issue has been raised here few times although there is no universal way and it looks like you have to compose your own recipe.
If you want just to leave files from `my_new_subdir` you need actually to remove all other files by your own. The concept is to use:
```
git filter-branch --t... |
24657868 | bisect everything, from initial commit | 21 | 2014-07-09 15:32:48 | <p>Say I have a small project with a very fast test script, and I just want to bisect everything, from the initial commit to the curret commit. How can I do that?</p>
<p>To clarify, I don't want to waste time identifying a commit that is good and a commit that is bad, so I'm looking for a quick way to mark the latest ... | 505 | 405,550 | 2025-05-13 13:19:27 | 24,657,869 | 12 | 2014-07-09 15:32:48 | 405,550 | 2025-05-13 13:19:27 | https://stackoverflow.com/q/24657868 | https://stackoverflow.com/a/24657869 | <p>Use:</p>
<pre class="lang-none prettyprint-override"><code>git bisect start
git bisect good
git bisect bad `git rev-list --max-parents=0 HEAD`
git bisect run ./test.sh
</code></pre>
<p>Or incorporate these commands into an alias, e.g.:</p>
<pre class="lang-none prettyprint-override"><code>bisect-all = !git bisect st... | <p>Use:</p> <pre class="lang-none prettyprint-override"><code>git bisect start git bisect good git bisect bad `git rev-list --max-parents=0 HEAD` git bisect run ./test.sh </code></pre> <p>Or incorporate these commands into an alias, e.g.:</p> <pre class="lang-none prettyprint-override"><code>bisect-all = !git bisect st... | 119, 47326 | git, git-bisect | <h1>bisect everything, from initial commit</h1>
<p>Say I have a small project with a very fast test script, and I just want to bisect everything, from the initial commit to the curret commit. How can I do that?</p>
<p>To clarify, I don't want to waste time identifying a commit that is good and a commit that is bad, so... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 22,899 | git | # bisect everything, from initial commit
Say I have a small project with a very fast test script, and I just want to bisect everything, from the initial commit to the curret commit. How can I do that?
To clarify, I don't want to waste time identifying a commit that is good and a commit that is bad, so I'm looking for... | Use:
```
git bisect start
git bisect good
git bisect bad `git rev-list --max-parents=0 HEAD`
git bisect run ./test.sh
```
Or incorporate these commands into an alias, e.g.:
```
bisect-all = !git bisect start && git bisect bad &&\
git bisect good `git rev-list --max-parents=0 --first-parent HEAD`
```
And the... |
1072602 | git submodule from Hg repo? | 21 | 2009-07-02 05:07:16 | <p>I have a very old project that includes the source from another project directly, instead of linking it as a library. Back in the bad days, when I was keeping everything in CVS, I had the external code on a vendor branch and did periodic imports. Now that my project is in git it would make more sense to include the ... | 6,214 | 44,747 | 2013-03-05 04:00:45 | 1,072,723 | 12 | 2009-07-02 05:59:59 | 6,309 | 2013-03-05 04:00:45 | https://stackoverflow.com/q/1072602 | https://stackoverflow.com/a/1072723 | <p>Since the <a href="http://github.com/schacon/hg-git/tree/master" rel="nofollow noreferrer">hg-git</a> does mention that submodules are not supported yet, that leaves only a manual option:</p>
<ul>
<li>setup a Git repository somewhere that you have push access to, </li>
<li>add it as a Git remote and then </li>
<li>... | <p>Since the <a href="http://github.com/schacon/hg-git/tree/master" rel="nofollow noreferrer">hg-git</a> does mention that submodules are not supported yet, that leaves only a manual option:</p> <ul> <li>setup a Git repository somewhere that you have push access to, </li> <li>add it as a Git remote and then </li> <li>... | 119, 802, 41612 | git, git-submodules, mercurial | <h1>git submodule from Hg repo?</h1>
<p>I have a very old project that includes the source from another project directly, instead of linking it as a library. Back in the bad days, when I was keeping everything in CVS, I had the external code on a vendor branch and did periodic imports. Now that my project is in git it ... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 22,901 | git | # git submodule from Hg repo?
I have a very old project that includes the source from another project directly, instead of linking it as a library. Back in the bad days, when I was keeping everything in CVS, I had the external code on a vendor branch and did periodic imports. Now that my project is in git it would mak... | Since the [hg-git](http://github.com/schacon/hg-git/tree/master) does mention that submodules are not supported yet, that leaves only a manual option:
- setup a Git repository somewhere that you have push access to,
- add it as a Git remote and then
- run `hg gpush` from within your project.
For example:
```
$ cd hg... |
14711796 | Publish local Git repository to Team Foundation Service | 20 | 2013-02-05 16:08:00 | <p>About a week ago Git support was added to Visual Studio 2012 and Team Foundation Service. I've been playing around with it a bit and wanted to publish a local repository to my team project. It's described in step 2 on the Team Foundation Service <a href="http://tfs.visualstudio.com/en-us/learn/code/publish-new-team-... | 18,611 | 95,503 | 2017-02-11 04:14:36 | 14,740,846 | 12 | 2013-02-06 23:26:48 | 206,297 | 2013-02-06 23:36:11 | https://stackoverflow.com/q/14711796 | https://stackoverflow.com/a/14740846 | <p>I was having the same problem. I don't know why.</p>
<p>However, after a bit of playing around, I managed to get the following
working. Disclaimer: can't guarantee this is actually the correct way
to do it. It may bork things further. And whether it does the same as what the missing 'Publish' menu item is su... | <p>I was having the same problem. I don't know why.</p> <p>However, after a bit of playing around, I managed to get the following working. Disclaimer: can't guarantee this is actually the correct way to do it. It may bork things further. And whether it does the same as what the missing 'Publish' menu item is su... | 119, 733, 33953, 116537 | azure-devops, git, tfs, visual-studio | <h1>Publish local Git repository to Team Foundation Service</h1>
<p>About a week ago Git support was added to Visual Studio 2012 and Team Foundation Service. I've been playing around with it a bit and wanted to publish a local repository to my team project. It's described in step 2 on the Team Foundation Service <a hre... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 22,902 | git | # Publish local Git repository to Team Foundation Service
About a week ago Git support was added to Visual Studio 2012 and Team Foundation Service. I've been playing around with it a bit and wanted to publish a local repository to my team project. It's described in step 2 on the Team Foundation Service [website](http:... | I was having the same problem. I don't know why.
However, after a bit of playing around, I managed to get the following
working. Disclaimer: can't guarantee this is actually the correct way
to do it. It may bork things further. And whether it does the same as what the missing 'Publish' menu item is supposed to do, I h... |
34760674 | Combine two branches from two repos with disjoint contents, preserving history in a single timestamp-collated branch | 19 | 2016-01-13 07:24:44 | <p>I don't know git very well. :-/ </p>
<h1>Background</h1>
<p>I have two unrelated git-based document repositories that I would like to combine into a single repository. I would like to preserve the original timestamps (dating back to 2005) and individual file histories. The two repos contain no branches, no folders... | 3,703 | 3,135,601 | 2023-01-29 02:34:30 | 34,861,819 | 12 | 2016-01-18 18:43:25 | 3,135,601 | 2016-01-18 18:43:25 | https://stackoverflow.com/q/34760674 | https://stackoverflow.com/a/34861819 | <p>While @codeWizard's reply was helpful, that approach didn't retain the timestamps the way I wanted. It did lead me down a rabbit hole that helped me find a solution though...</p>
<ol>
<li><p>Create a new, blank repository</p>
<pre><code>git init
</code></pre></li>
<li><p>Add and fetch the old repositories as remot... | <p>While @codeWizard's reply was helpful, that approach didn't retain the timestamps the way I wanted. It did lead me down a rabbit hole that helped me find a solution though...</p> <ol> <li><p>Create a new, blank repository</p> <pre><code>git init </code></pre></li> <li><p>Add and fetch the old repositories as remot... | 119, 29934 | git, git-rebase | <h1>Combine two branches from two repos with disjoint contents, preserving history in a single timestamp-collated branch</h1>
<p>I don't know git very well. :-/ </p>
<h1>Background</h1>
<p>I have two unrelated git-based document repositories that I would like to combine into a single repository. I would like to prese... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 22,903 | git | # Combine two branches from two repos with disjoint contents, preserving history in a single timestamp-collated branch
I don't know git very well. :-/
# Background
I have two unrelated git-based document repositories that I would like to combine into a single repository. I would like to preserve the original timesta... | While @codeWizard's reply was helpful, that approach didn't retain the timestamps the way I wanted. It did lead me down a rabbit hole that helped me find a solution though...
1. Create a new, blank repository
```
git init
```
2. Add and fetch the old repositories as remotes
```
git remote add -f oldRe... |
19416195 | How to make Git "add --all" by default? | 19 | 2013-10-17 00:21:46 | <p>I just ran into this message:</p>
<pre><code>$ git add .
warning: You ran 'git add' with neither '-A (--all)' or '--ignore-removal',
whose behaviour will change in Git 2.0 with respect to paths you removed.
Paths like 'README.md' that are
removed from your working tree are ignored with this version of Git.
* 'git ... | 4,838 | 906,658 | 2014-03-22 13:20:39 | 19,419,348 | 12 | 2013-10-17 06:05:24 | 6,309 | 2014-03-12 16:22:53 | https://stackoverflow.com/q/19416195 | https://stackoverflow.com/a/19419348 | <p>The warning you see comes from <a href="https://github.com/git/git/commit/ccc663bc24a3925b818df0ce97a5ba47e221f383">commit ccc663b</a>, itself reworking <a href="https://github.com/git/git/commit/45c45e300bcbe493a39533bb04f6bd548e8a3f19">commit 45c45e3</a>.</p>
<p>That second commit does include:</p>
<h2><code>git... | <p>The warning you see comes from <a href="https://github.com/git/git/commit/ccc663bc24a3925b818df0ce97a5ba47e221f383">commit ccc663b</a>, itself reworking <a href="https://github.com/git/git/commit/45c45e300bcbe493a39533bb04f6bd548e8a3f19">commit 45c45e3</a>.</p> <p>That second commit does include:</p> <h2><code>git... | 119, 1448, 32868 | alias, git, git-config | <h1>How to make Git "add --all" by default?</h1>
<p>I just ran into this message:</p>
<pre><code>$ git add .
warning: You ran 'git add' with neither '-A (--all)' or '--ignore-removal',
whose behaviour will change in Git 2.0 with respect to paths you removed.
Paths like 'README.md' that are
removed from your working tr... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 22,904 | git | # How to make Git "add --all" by default?
I just ran into this message:
```
$ git add .
warning: You ran 'git add' with neither '-A (--all)' or '--ignore-removal',
whose behaviour will change in Git 2.0 with respect to paths you removed.
Paths like 'README.md' that are
removed from your working tree are ignored with ... | The warning you see comes from [commit ccc663b](https://github.com/git/git/commit/ccc663bc24a3925b818df0ce97a5ba47e221f383), itself reworking [commit 45c45e3](https://github.com/git/git/commit/45c45e300bcbe493a39533bb04f6bd548e8a3f19).
That second commit does include:
## `git add`: start preparing for "`git add <path... |
16057391 | git free disk space by clearing repository history | 19 | 2013-04-17 10:13:45 | <p>so I'm working with some friends and we are all new to git and one of them committed a large amount of external binary files that slows down the repository, and takes up a large disk-space.</p>
<p>We've just started the project so there's nothing important in it really except a readme file. So what we'd like to do ... | 19,078 | 700,735 | 2017-02-28 18:21:29 | 16,057,732 | 12 | 2013-04-17 10:32:16 | 229,753 | 2013-04-17 10:44:23 | https://stackoverflow.com/q/16057391 | https://stackoverflow.com/a/16057732 | <p>Rebasing (<code>git rebase -i --root</code>, if you didn't revert the bad commit just delete its line, if you did, squash the bad commit with the revert commit) or using filter-branch will clear the data from your branch's history, but won't make it disappear from the repository entirely.</p>
<p>This is because, fo... | <p>Rebasing (<code>git rebase -i --root</code>, if you didn't revert the bad commit just delete its line, if you did, squash the bad commit with the revert commit) or using filter-branch will clear the data from your branch's history, but won't make it disappear from the repository entirely.</p> <p>This is because, fo... | 119 | git | <h1>git free disk space by clearing repository history</h1>
<p>so I'm working with some friends and we are all new to git and one of them committed a large amount of external binary files that slows down the repository, and takes up a large disk-space.</p>
<p>We've just started the project so there's nothing important... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 22,906 | git | # git free disk space by clearing repository history
so I'm working with some friends and we are all new to git and one of them committed a large amount of external binary files that slows down the repository, and takes up a large disk-space.
We've just started the project so there's nothing important in it really ex... | Rebasing (`git rebase -i --root`, if you didn't revert the bad commit just delete its line, if you did, squash the bad commit with the revert commit) or using filter-branch will clear the data from your branch's history, but won't make it disappear from the repository entirely.
This is because, for safety and tracabil... |
12868131 | Using `git show` to create and apply patches spanning multiple commits | 19 | 2012-10-12 22:47:44 | <p>Lately I've been using <code>git show <hash></code> to create diffs for later reference because it's easier to type than <code>git diff <hash>~ <hash></code> and it shows the commit information (timestamp, user, hash, comment). You can then use <code>git apply <filename></code> to apply the p... | 31,346 | 817,950 | 2015-07-20 09:58:20 | 12,868,196 | 12 | 2012-10-12 22:56:06 | 582 | 2012-10-12 22:56:06 | https://stackoverflow.com/q/12868131 | https://stackoverflow.com/a/12868196 | <p>You can use <code>git format-patch</code> to generate MIME emails representing the commits, including their metadata (message, authorship, etc). You can then reapply these with <code>git am</code>.</p>
<p>So <code>git format-patch HEAD~3</code> will generate 3 patches for the last 3 commits, and you can then pipe t... | <p>You can use <code>git format-patch</code> to generate MIME emails representing the commits, including their metadata (message, authorship, etc). You can then reapply these with <code>git am</code>.</p> <p>So <code>git format-patch HEAD~3</code> will generate 3 patches for the last 3 commits, and you can then pipe t... | 119, 606, 2132, 74295 | diff, git, git-show, patch | <h1>Using `git show` to create and apply patches spanning multiple commits</h1>
<p>Lately I've been using <code>git show <hash></code> to create diffs for later reference because it's easier to type than <code>git diff <hash>~ <hash></code> and it shows the commit information (timestamp, user, hash, c... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 22,907 | git | # Using `git show` to create and apply patches spanning multiple commits
Lately I've been using `git show <hash>` to create diffs for later reference because it's easier to type than `git diff <hash>~ <hash>` and it shows the commit information (timestamp, user, hash, comment). You can then use `git apply <filename>` ... | You can use `git format-patch` to generate MIME emails representing the commits, including their metadata (message, authorship, etc). You can then reapply these with `git am`.
So `git format-patch HEAD~3` will generate 3 patches for the last 3 commits, and you can then pipe these all into `git am`. If you want to be s... |
10666847 | How to rename a git repo (project) which contains submodules in its subdirectories | 19 | 2012-05-19 16:11:18 | <p>I never expect renaming a git repo, which, more specifically, is the top-level folder holds the project, would be so hard. Yes, the project containing some submodules, but it is the <strong>top-level folder</strong> that needs renaming, not the <strong>submodule folder</strong>. Git, it seems, records some odd <em>a... | 3,932 | 974,312 | 2014-05-06 14:38:00 | 10,667,194 | 12 | 2012-05-19 17:00:32 | 761,202 | 2012-05-20 20:27:07 | https://stackoverflow.com/q/10666847 | https://stackoverflow.com/a/10667194 | <p>You have a couple of options, they end up being the same thing:</p>
<p><strong>clone again</strong></p>
<p>Instead of renaming the folder - just clone again</p>
<pre><code>$ cd /project/original
$ cd ..
$ mkdir moved
$ git init
$ git pull ../original master
$ git submodule init
$ git submodule update
</code></pre... | <p>You have a couple of options, they end up being the same thing:</p> <p><strong>clone again</strong></p> <p>Instead of renaming the folder - just clone again</p> <pre><code>$ cd /project/original $ cd .. $ mkdir moved $ git init $ git pull ../original master $ git submodule init $ git submodule update </code></pre... | 119, 41612 | git, git-submodules | <h1>How to rename a git repo (project) which contains submodules in its subdirectories</h1>
<p>I never expect renaming a git repo, which, more specifically, is the top-level folder holds the project, would be so hard. Yes, the project containing some submodules, but it is the <strong>top-level folder</strong> that need... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 22,908 | git | # How to rename a git repo (project) which contains submodules in its subdirectories
I never expect renaming a git repo, which, more specifically, is the top-level folder holds the project, would be so hard. Yes, the project containing some submodules, but it is the **top-level folder** that needs renaming, not the **... | You have a couple of options, they end up being the same thing:
**clone again**
Instead of renaming the folder - just clone again
```
$ cd /project/original
$ cd ..
$ mkdir moved
$ git init
$ git pull ../original master
$ git submodule init
$ git submodule update
```
Compare `original/.git/config` to `moved/.git/co... |
38638261 | change no of lines after and before in git diff output | 18 | 2016-07-28 13:43:20 | <p>I want to increase the number of lines displayed before and after changes in <code>git diff</code> output.</p>
<p>Analogous to <code>grep -A3 -B5 ...</code></p>
| 8,889 | 1,288,120 | 2022-07-07 11:15:48 | 38,638,340 | 12 | 2016-07-28 13:46:21 | 147,356 | 2016-07-28 13:46:21 | https://stackoverflow.com/q/38638261 | https://stackoverflow.com/a/38638340 | <p>According to <code>git diff --help</code>, <code>git diff</code> supports the same arguments as the standard <code>diff</code> command w/r/t context:</p>
<pre><code> -U<n>, --unified=<n>
Generate diffs with <n> lines of context instead of the usual three. Implies
-p.
</code></pre>
| <p>According to <code>git diff --help</code>, <code>git diff</code> supports the same arguments as the standard <code>diff</code> command w/r/t context:</p> <pre><code> -U<n>, --unified=<n> Generate diffs with <n> lines of context instead of the usual three. Implies -p. </code></pre> | 119, 9033 | git, git-diff | <h1>change no of lines after and before in git diff output</h1>
<p>I want to increase the number of lines displayed before and after changes in <code>git diff</code> output.</p>
<p>Analogous to <code>grep -A3 -B5 ...</code></p>
| q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 22,911 | git | # change no of lines after and before in git diff output
I want to increase the number of lines displayed before and after changes in `git diff` output.
Analogous to `grep -A3 -B5 ...` | According to `git diff --help`, `git diff` supports the same arguments as the standard `diff` command w/r/t context:
```
-U<n>, --unified=<n>
Generate diffs with <n> lines of context instead of the usual three. Implies
-p.
``` |
20555761 | `pip install pandas` gives UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 41: ordinal not in range(128) | 18 | 2013-12-12 22:40:00 | <p>When performing <code>pip install pandas</code> on a Digital Ocean 512MB droplet, I get the error <code>UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 41: ordinal not in range(128)
</code>.</p>
<p>Any ideas what may have caused it? I'm running Ubuntu 12.04 64bit.</p>
<p><a href="https://gist.... | 12,086 | 3,023,615 | 2018-11-12 23:33:10 | 20,557,179 | 12 | 2013-12-13 00:44:49 | 4,279 | 2013-12-13 00:44:49 | https://stackoverflow.com/q/20555761 | https://stackoverflow.com/a/20557179 | <p>It looks like gcc being killed due to insufficient memory (see <a href="https://stackoverflow.com/questions/20555761/pip-install-pandas-gives-unicodedecodeerror-ascii-codec-cant-decode-byte-0#comment30742213_20555761">@Blender's comment)</a> exposed a bug in pip. It mixes bytestrings and Unicode while logging that l... | <p>It looks like gcc being killed due to insufficient memory (see <a href="https://stackoverflow.com/questions/20555761/pip-install-pandas-gives-unicodedecodeerror-ascii-codec-cant-decode-byte-0#comment30742213_20555761">@Blender's comment)</a> exposed a bug in pip. It mixes bytestrings and Unicode while logging that l... | 16, 549, 5119, 12775, 97102 | digital-ocean, pip, python, python-2.x, ubuntu | <h1>`pip install pandas` gives UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 41: ordinal not in range(128)</h1>
<p>When performing <code>pip install pandas</code> on a Digital Ocean 512MB droplet, I get the error <code>UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 41: ordin... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 22,913 | git | # `pip install pandas` gives UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 41: ordinal not in range(128)
When performing `pip install pandas` on a Digital Ocean 512MB droplet, I get the error `UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 41: ordinal not in range(128)`.
A... | It looks like gcc being killed due to insufficient memory (see [@Blender's comment)](https://stackoverflow.com/questions/20555761/pip-install-pandas-gives-unicodedecodeerror-ascii-codec-cant-decode-byte-0#comment30742213_20555761) exposed a bug in pip. It mixes bytestrings and Unicode while logging that leads to:
```
... |
10283947 | git, gitolite error push | 18 | 2012-04-23 15:54:49 | <p>I just installed gitolite but when I push on the repository gitolite-admin I get an error:</p>
<pre><code>git push
Counting objects: 9, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (6/6), done.
Writing objects: 100% (7/7), 605 bytes, done.
Total 7 (delta 1), reused 0 (delta 0)
remote: Em... | 18,448 | 1,351,716 | 2015-09-24 11:26:31 | 11,701,630 | 12 | 2012-07-28 13:58:22 | 1,559,707 | 2012-07-29 06:00:20 | https://stackoverflow.com/q/10283947 | https://stackoverflow.com/a/11701630 | <p><em>Before you start: The <strong>gitbox</strong> is the remote machine with git and gitolite installed. The <strong>git</strong> user is the user that gitolite runs as on the gitbox.</em></p>
<p>You can overcome this error by (1) generating a new key pair, (2) registering the public key on the gitbox, and (3) by e... | <p><em>Before you start: The <strong>gitbox</strong> is the remote machine with git and gitolite installed. The <strong>git</strong> user is the user that gitolite runs as on the gitbox.</em></p> <p>You can overcome this error by (1) generating a new key pair, (2) registering the public key on the gitbox, and (3) by e... | 119, 39151 | git, gitolite | <h1>git, gitolite error push</h1>
<p>I just installed gitolite but when I push on the repository gitolite-admin I get an error:</p>
<pre><code>git push
Counting objects: 9, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (6/6), done.
Writing objects: 100% (7/7), 605 bytes, done.
Total 7 (delta... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 22,915 | git | # git, gitolite error push
I just installed gitolite but when I push on the repository gitolite-admin I get an error:
```
git push
Counting objects: 9, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (6/6), done.
Writing objects: 100% (7/7), 605 bytes, done.
Total 7 (delta 1), reused 0 (delta... | *Before you start: The **gitbox** is the remote machine with git and gitolite installed. The **git** user is the user that gitolite runs as on the gitbox.*
You can overcome this error by (1) generating a new key pair, (2) registering the public key on the gitbox, and (3) by ensuring that when you connect to the gitbox... |
11694065 | git-svn migration fatal: not a valid SHA1 update-ref refs/heads/master refs/remotes/trunk: command returned error: 128 | 18 | 2012-07-27 18:59:36 | <p>Trying to migrate a large but linear svn repository to git. The svn repository does not have the standard layout (trunk, branches, tags)...just one directory with the trunk.</p>
<p>Ubuntu 12.4 LTS,git 1.7.9.5.</p>
<pre><code>$ git svn clone https://coawstmodel.sourcerepo.com/coawstmodel/COAWST --authors-file=../us... | 21,782 | 1,558,493 | 2018-11-15 03:48:42 | 11,694,783 | 12 | 2012-07-27 19:52:08 | 1,212,681 | 2012-07-27 19:52:08 | https://stackoverflow.com/q/11694065 | https://stackoverflow.com/a/11694783 | <p>I think that you run the correct command. Alternatively you could run</p>
<pre><code>$ git svn clone https://coawstmodel.sourcerepo.com/coawstmodel --trunk=COAWST --authors-file=../users.txt COAWST
</code></pre>
<p>git-svn nearly finishes its work in each case. The only thing it tries to do is to set 'master' to p... | <p>I think that you run the correct command. Alternatively you could run</p> <pre><code>$ git svn clone https://coawstmodel.sourcerepo.com/coawstmodel --trunk=COAWST --authors-file=../users.txt COAWST </code></pre> <p>git-svn nearly finishes its work in each case. The only thing it tries to do is to set 'master' to p... | 6452 | git-svn | <h1>git-svn migration fatal: not a valid SHA1 update-ref refs/heads/master refs/remotes/trunk: command returned error: 128</h1>
<p>Trying to migrate a large but linear svn repository to git. The svn repository does not have the standard layout (trunk, branches, tags)...just one directory with the trunk.</p>
<p>Ubuntu ... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 22,916 | git | # git-svn migration fatal: not a valid SHA1 update-ref refs/heads/master refs/remotes/trunk: command returned error: 128
Trying to migrate a large but linear svn repository to git. The svn repository does not have the standard layout (trunk, branches, tags)...just one directory with the trunk.
Ubuntu 12.4 LTS,git 1.7... | I think that you run the correct command. Alternatively you could run
```
$ git svn clone https://coawstmodel.sourcerepo.com/coawstmodel --trunk=COAWST --authors-file=../users.txt COAWST
```
git-svn nearly finishes its work in each case. The only thing it tries to do is to set 'master' to point to your trunk. Because... |
11028840 | Use git on existing SVN repo | 18 | 2012-06-14 07:48:48 | <p>I work with a legacy <code>svn</code> repo. However, I would like to enjoy the benefits of <code>git</code> on my local machine.</p>
<ul>
<li>The first option is <code>git init</code> the root of my current repo, write code, and independently commit code locally (<code>git commit</code>) and remotely (<code>svn com... | 11,192 | 51,197 | 2020-06-18 07:31:08 | 11,030,305 | 12 | 2012-06-14 09:31:53 | 220,155 | 2012-06-14 09:31:53 | https://stackoverflow.com/q/11028840 | https://stackoverflow.com/a/11030305 | <p>I'd very strongly advocate for <code>git-svn</code>. Myself and some of my colleagues have attempted to use a Git repro over the top of a Subversion one, and it's a process made of pain and horror.</p>
<p>Admittedly this is for Subversion 1.6.x; I suspect it'd be better with 1.7.x, since that only has a single <cod... | <p>I'd very strongly advocate for <code>git-svn</code>. Myself and some of my colleagues have attempted to use a Git repro over the top of a Subversion one, and it's a process made of pain and horror.</p> <p>Admittedly this is for Subversion 1.6.x; I suspect it'd be better with 1.7.x, since that only has a single <cod... | 63, 119, 6452 | git, git-svn, svn | <h1>Use git on existing SVN repo</h1>
<p>I work with a legacy <code>svn</code> repo. However, I would like to enjoy the benefits of <code>git</code> on my local machine.</p>
<ul>
<li>The first option is <code>git init</code> the root of my current repo, write code, and independently commit code locally (<code>git comm... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 22,917 | git | # Use git on existing SVN repo
I work with a legacy `svn` repo. However, I would like to enjoy the benefits of `git` on my local machine.
- The first option is `git init` the root of my current repo, write code, and independently commit code locally (`git commit`) and remotely (`svn commit`).
- The second option is [... | I'd very strongly advocate for `git-svn`. Myself and some of my colleagues have attempted to use a Git repro over the top of a Subversion one, and it's a process made of pain and horror.
Admittedly this is for Subversion 1.6.x; I suspect it'd be better with 1.7.x, since that only has a single `.svn` directory.
- Upda... |
6289329 | Using dropbox and git without conflitcts | 18 | 2011-06-09 07:14:58 | <p>I'm working with people using only Dropbox as version control and collaboration tool. I don't intend to change their behavior. On the other hand, I'm a git-addicted, and want to use it for my personal use.</p>
<p>Is their anyway to have a .git directory without syncing it in Dropbox ?</p>
<p>Thanks</p>
| 6,054 | 604,896 | 2021-03-29 10:00:00 | 6,289,404 | 12 | 2011-06-09 07:22:19 | 34,088 | 2011-06-09 07:22:19 | https://stackoverflow.com/q/6289329 | https://stackoverflow.com/a/6289404 | <p>According to <a href="http://forums.dropbox.com/topic.php?id=3552#post-141264">this thread</a> in the Dropbox forum, you can't omit/exclude folders. There is <a href="https://www.dropbox.com/help/175">Selective Sync</a> but that also doesn't what you need.</p>
<p>So the best solution right now is to sync manually, ... | <p>According to <a href="http://forums.dropbox.com/topic.php?id=3552#post-141264">this thread</a> in the Dropbox forum, you can't omit/exclude folders. There is <a href="https://www.dropbox.com/help/175">Selective Sync</a> but that also doesn't what you need.</p> <p>So the best solution right now is to sync manually, ... | 119, 17650 | dropbox, git | <h1>Using dropbox and git without conflitcts</h1>
<p>I'm working with people using only Dropbox as version control and collaboration tool. I don't intend to change their behavior. On the other hand, I'm a git-addicted, and want to use it for my personal use.</p>
<p>Is their anyway to have a .git directory without sync... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 22,918 | git | # Using dropbox and git without conflitcts
I'm working with people using only Dropbox as version control and collaboration tool. I don't intend to change their behavior. On the other hand, I'm a git-addicted, and want to use it for my personal use.
Is their anyway to have a .git directory without syncing it in Dropbo... | According to [this thread](http://forums.dropbox.com/topic.php?id=3552#post-141264) in the Dropbox forum, you can't omit/exclude folders. There is [Selective Sync](https://www.dropbox.com/help/175) but that also doesn't what you need.
So the best solution right now is to sync manually, for example with `rsync(1)`:
1.... |
2045329 | Prohibit remote pushing to the master branch in git | 18 | 2010-01-11 22:11:06 | <p>Is there any way to modify central repository's configuration to disallow any remote pushing to master branch (using git)? It would only be updated via branch merging by a release owner. </p>
<p>It is possible to do in child repositories but unfortunately it's not always fool-proof enough, easy to forget to do it o... | 7,334 | 223,632 | 2016-04-27 17:29:26 | 2,045,610 | 12 | 2010-01-11 23:07:33 | 19,563 | 2010-01-11 23:23:41 | https://stackoverflow.com/q/2045329 | https://stackoverflow.com/a/2045610 | <p>You should take a look at the sample <code>update</code> hook called <code>update-paranoid</code> in the <code>contrib</code> directory of the git distribution. It allows you to set up per-branch ACLs restricting who is allowed to push to which branches. This way you can restrict updating master to just release owne... | <p>You should take a look at the sample <code>update</code> hook called <code>update-paranoid</code> in the <code>contrib</code> directory of the git distribution. It allows you to set up per-branch ACLs restricting who is allowed to push to which branches. This way you can restrict updating master to just release owne... | 119 | git | <h1>Prohibit remote pushing to the master branch in git</h1>
<p>Is there any way to modify central repository's configuration to disallow any remote pushing to master branch (using git)? It would only be updated via branch merging by a release owner. </p>
<p>It is possible to do in child repositories but unfortunately... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 22,919 | git | # Prohibit remote pushing to the master branch in git
Is there any way to modify central repository's configuration to disallow any remote pushing to master branch (using git)? It would only be updated via branch merging by a release owner.
It is possible to do in child repositories but unfortunately it's not always ... | You should take a look at the sample `update` hook called `update-paranoid` in the `contrib` directory of the git distribution. It allows you to set up per-branch ACLs restricting who is allowed to push to which branches. This way you can restrict updating master to just release owners.
I'm not quite sure what you mea... |
43959748 | what is the abbreviation of GIT? | 17 | 2017-05-14 02:11:34 | <p>In the manual, GIT is "the stupid content tracker". The abbreviation of "the stupid content tracker" is not GIT. I doubt about what the abbreviation of GIT.</p>
| 33,346 | 7,875,114 | 2017-05-14 13:04:04 | 43,960,731 | 12 | 2017-05-14 05:39:20 | 6,309 | 2017-05-14 05:44:53 | https://stackoverflow.com/q/43959748 | https://stackoverflow.com/a/43960731 | <p>Note: git is spelled 'git' (for the command) or Git (for the product).<br>
Not "GIT", since it is <em>not</em> an acronym, but rather an expression of intent: a tool which does "just" version control without trying to be smart (and include tons of other features)<br>
See for instance "<a href="https://github.com/git... | <p>Note: git is spelled 'git' (for the command) or Git (for the product).<br> Not "GIT", since it is <em>not</em> an acronym, but rather an expression of intent: a tool which does "just" version control without trying to be smart (and include tons of other features)<br> See for instance "<a href="https://github.com/git... | 119, 14253 | abbreviation, git | <h1>what is the abbreviation of GIT?</h1>
<p>In the manual, GIT is "the stupid content tracker". The abbreviation of "the stupid content tracker" is not GIT. I doubt about what the abbreviation of GIT.</p>
| q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 22,921 | git | # what is the abbreviation of GIT?
In the manual, GIT is "the stupid content tracker". The abbreviation of "the stupid content tracker" is not GIT. I doubt about what the abbreviation of GIT. | Note: git is spelled 'git' (for the command) or Git (for the product).
Not "GIT", since it is *not* an acronym, but rather an expression of intent: a tool which does "just" version control without trying to be smart (and include tons of other features)
See for instance "[`git-merge-stupid.sh`](https://github.com/gi... |
26021591 | What are those 'WIP' and 'index' commits that appear after stashing? | 17 | 2014-09-24 16:06:47 | <p>When I run <code>git lg</code> on my local development branch, the latest commit is shown as below:</p>
<pre><code>* 7d21213 - (1 hours ago) update business rules - developer1 (HEAD, origin/develop, origin/HEAD, develop)
</code></pre>
<p>However, if I stash local changes by running <code>git stash</code> and then ... | 9,952 | 2,433,619 | 2022-04-27 22:54:21 | 26,022,071 | 12 | 2014-09-24 16:33:29 | 2,541,573 | 2014-09-24 17:17:40 | https://stackoverflow.com/q/26021591 | https://stackoverflow.com/a/26022071 | <h2><code>git lg</code>? What <code>git lg</code>?</h2>
<p>Be aware that <code>lg</code> is not a native Git verb. True, many people use an alias called <code>lg</code> that usually corresponds to</p>
<pre><code>git log --all --oneline --graph --decorate
</code></pre>
<p>This definition seems to be the one you're us... | <h2><code>git lg</code>? What <code>git lg</code>?</h2> <p>Be aware that <code>lg</code> is not a native Git verb. True, many people use an alias called <code>lg</code> that usually corresponds to</p> <pre><code>git log --all --oneline --graph --decorate </code></pre> <p>This definition seems to be the one you're us... | 119, 13091, 47913 | git, git-log, git-stash | <h1>What are those 'WIP' and 'index' commits that appear after stashing?</h1>
<p>When I run <code>git lg</code> on my local development branch, the latest commit is shown as below:</p>
<pre><code>* 7d21213 - (1 hours ago) update business rules - developer1 (HEAD, origin/develop, origin/HEAD, develop)
</code></pre>
<p... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 22,922 | git | # What are those 'WIP' and 'index' commits that appear after stashing?
When I run `git lg` on my local development branch, the latest commit is shown as below:
```
* 7d21213 - (1 hours ago) update business rules - developer1 (HEAD, origin/develop, origin/HEAD, develop)
```
However, if I stash local changes by runnin... | ## `git lg`? What `git lg`?
Be aware that `lg` is not a native Git verb. True, many people use an alias called `lg` that usually corresponds to
```
git log --all --oneline --graph --decorate
```
This definition seems to be the one you're using, here. However, aliases are local; what `git lg` means in your config may... |
10868591 | How to git grep in the whole tree when I'm in a subdirectory? | 17 | 2012-06-03 07:18:32 | <p>Normally when I issue <code>git grep</code>, it will only search the current directory and below, for instance</p>
<pre><code>$ cat A
1
$ cd d
$ cat B
1
$ git grep 1
B:1
$ cd ..;git grep 1
A:1
B:1
</code></pre>
<p>How can I tell <code>git grep</code> "search the entire tree, no matter the current working directory... | 6,065 | 810,154 | 2024-12-05 11:21:40 | 10,868,614 | 12 | 2012-06-03 07:25:58 | 5,168 | 2020-10-02 17:58:24 | https://stackoverflow.com/q/10868591 | https://stackoverflow.com/a/10868614 | <p>Git aliases that run shell commands are always executed in the top level directory (see the <a href="https://git-scm.com/docs/git-config#Documentation/git-config.txt-alias" rel="nofollow noreferrer"><code>git config</code> man page</a>), so you can add this to your <code>.gitconfig</code> file:</p>
<pre><code>[alias... | <p>Git aliases that run shell commands are always executed in the top level directory (see the <a href="https://git-scm.com/docs/git-config#Documentation/git-config.txt-alias" rel="nofollow noreferrer"><code>git config</code> man page</a>), so you can add this to your <code>.gitconfig</code> file:</p> <pre><code>[alias... | 119, 1271 | git, grep | <h1>How to git grep in the whole tree when I'm in a subdirectory?</h1>
<p>Normally when I issue <code>git grep</code>, it will only search the current directory and below, for instance</p>
<pre><code>$ cat A
1
$ cd d
$ cat B
1
$ git grep 1
B:1
$ cd ..;git grep 1
A:1
B:1
</code></pre>
<p>How can I tell <code>git grep<... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 22,923 | git | # How to git grep in the whole tree when I'm in a subdirectory?
Normally when I issue `git grep`, it will only search the current directory and below, for instance
```
$ cat A
1
$ cd d
$ cat B
1
$ git grep 1
B:1
$ cd ..;git grep 1
A:1
B:1
```
How can I tell `git grep` "search the entire tree, no matter the current w... | Git aliases that run shell commands are always executed in the top level directory (see the [`git config` man page](https://git-scm.com/docs/git-config#Documentation/git-config.txt-alias)), so you can add this to your `.gitconfig` file:
```
[alias]
rgrep = !git grep
```
Alternatively, you could use `git rev-parse... |
5810804 | What's the best way to merge external changes into my Git repo? | 17 | 2011-04-27 21:25:44 | <p>I have a project in a Git repo and I have been sent changes that have been made outside of Git. These changes are based on an earlier version that I have been making changes to myself. What is the best way to merge these external files with mine?</p>
<p>Many thanks!</p>
| 5,963 | 728,142 | 2011-04-27 21:33:23 | 5,810,874 | 12 | 2011-04-27 21:33:23 | 19,750 | 2011-04-27 21:33:23 | https://stackoverflow.com/q/5810804 | https://stackoverflow.com/a/5810874 | <p>The best way is to tell git what commit they were based off of, to give you the best chance of an automatic merge.</p>
<ol>
<li><code>git checkout <sha1 of the old commit> -b mybranch</code>, to rewind your work tree and start a new branch.</li>
<li>If the changes were sent as a diff, use <code>git-apply</cod... | <p>The best way is to tell git what commit they were based off of, to give you the best chance of an automatic merge.</p> <ol> <li><code>git checkout <sha1 of the old commit> -b mybranch</code>, to rewind your work tree and start a new branch.</li> <li>If the changes were sent as a diff, use <code>git-apply</cod... | 119 | git | <h1>What's the best way to merge external changes into my Git repo?</h1>
<p>I have a project in a Git repo and I have been sent changes that have been made outside of Git. These changes are based on an earlier version that I have been making changes to myself. What is the best way to merge these external files with min... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 22,924 | git | # What's the best way to merge external changes into my Git repo?
I have a project in a Git repo and I have been sent changes that have been made outside of Git. These changes are based on an earlier version that I have been making changes to myself. What is the best way to merge these external files with mine?
Many ... | The best way is to tell git what commit they were based off of, to give you the best chance of an automatic merge.
1. `git checkout <sha1 of the old commit> -b mybranch`, to rewind your work tree and start a new branch.
2. If the changes were sent as a diff, use `git-apply` to apply them to the work tree, otherwise ju... |
5279624 | What's the purpose of the colon in this git repository url? | 17 | 2011-03-11 23:49:39 | <p>Please pardon my ignorance; I'm new to Git and not sure where better to look for an answer, but what's the purpose of the colon after 'example.com' in the following url (which points to a git repository on my mediatemple server)?</p>
<p><code>git remote add repo_name ssh://serveradmin%example.com@example.com:/home/... | 5,987 | 560,429 | 2023-01-19 15:15:53 | 5,281,822 | 12 | 2011-03-12 09:56:21 | 223,092 | 2011-03-12 09:56:21 | https://stackoverflow.com/q/5279624 | https://stackoverflow.com/a/5281822 | <p>This syntax is actually wrong, but it's a bit like the <code>scp</code>-style syntax that you can use in git URLs, where it separates the hostname from the path on that host. Your options for specifying git URLs are listed in the <a href="http://git-scm.com/docs/git-clone#_git_urls_a_id_urls_a" rel="noreferrer">git... | <p>This syntax is actually wrong, but it's a bit like the <code>scp</code>-style syntax that you can use in git URLs, where it separates the hostname from the path on that host. Your options for specifying git URLs are listed in the <a href="http://git-scm.com/docs/git-clone#_git_urls_a_id_urls_a" rel="noreferrer">git... | 119 | git | <h1>What's the purpose of the colon in this git repository url?</h1>
<p>Please pardon my ignorance; I'm new to Git and not sure where better to look for an answer, but what's the purpose of the colon after 'example.com' in the following url (which points to a git repository on my mediatemple server)?</p>
<p><code>git ... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 22,925 | git | # What's the purpose of the colon in this git repository url?
Please pardon my ignorance; I'm new to Git and not sure where better to look for an answer, but what's the purpose of the colon after 'example.com' in the following url (which points to a git repository on my mediatemple server)?
`git remote add repo_name ... | This syntax is actually wrong, but it's a bit like the `scp`-style syntax that you can use in git URLs, where it separates the hostname from the path on that host. Your options for specifying git URLs are listed in the [git clone documentation](http://git-scm.com/docs/git-clone#_git_urls_a_id_urls_a). In your case you ... |
29393875 | How to cherry pick from branch A to branch B on a system without history? | 16 | 2015-04-01 14:45:55 | <p>Suppose I have a new system with no git history and I take a fresh checkout of branch A. Branch A already has a commit C1 which I did yesterday from some other system.
Now I want to cherry-pick this commit C1 in branch B.
Issue:</p>
<ol>
<li>If I take checkout of branch A and go to commit C1 (in history in Git view... | 39,216 | 1,897,528 | 2022-07-01 06:39:36 | 29,394,022 | 12 | 2015-04-01 14:51:28 | 491,897 | 2015-04-01 14:51:28 | https://stackoverflow.com/q/29393875 | https://stackoverflow.com/a/29394022 | <p>I'm not familiar with the GUI you are using in particular, but the concept you are describing is perfectly acceptable in git.</p>
<p>To cherry-pick a commit from branch A to branch B, use the following command line commands:</p>
<pre><code>git checkout branchB
git cherry-pick hashOfC1
</code></pre>
<p>There shoul... | <p>I'm not familiar with the GUI you are using in particular, but the concept you are describing is perfectly acceptable in git.</p> <p>To cherry-pick a commit from branch A to branch B, use the following command line commands:</p> <pre><code>git checkout branchB git cherry-pick hashOfC1 </code></pre> <p>There shoul... | 53, 119, 36489, 52272 | cherry-pick, eclipse, gerrit, git | <h1>How to cherry pick from branch A to branch B on a system without history?</h1>
<p>Suppose I have a new system with no git history and I take a fresh checkout of branch A. Branch A already has a commit C1 which I did yesterday from some other system.
Now I want to cherry-pick this commit C1 in branch B.
Issue:</p>
... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 22,926 | git | # How to cherry pick from branch A to branch B on a system without history?
Suppose I have a new system with no git history and I take a fresh checkout of branch A. Branch A already has a commit C1 which I did yesterday from some other system.
Now I want to cherry-pick this commit C1 in branch B.
Issue:
1. If I take ... | I'm not familiar with the GUI you are using in particular, but the concept you are describing is perfectly acceptable in git.
To cherry-pick a commit from branch A to branch B, use the following command line commands:
```
git checkout branchB
git cherry-pick hashOfC1
```
There should be a sort of 'view all branches'... |
22366322 | Entering insert mode automatically when editing git commit messages | 16 | 2014-03-12 23:50:05 | <p>If I do a <code>git commit</code>, when Vim opens, I want to be in insert mode straight away.</p>
<p>I noticed that the <code>filetype</code> is set to <code>gitcommit</code> when editing, so I thought I could achieve this with an autocommand.</p>
<pre><code>au BufRead gitcommit startinsert!
</code></pre>
<p>This... | 2,576 | 120,615 | 2016-12-16 16:15:40 | 22,367,433 | 12 | 2014-03-13 01:38:18 | 3,130,080 | 2014-03-13 01:38:18 | https://stackoverflow.com/q/22366322 | https://stackoverflow.com/a/22367433 | <p>In <code>:au Event pattern command</code>, the pattern is usually matched against the buffer name. Instead of <code>BufRead gitcommit</code>, you could use <code>BufRead COMMIT_EDITMSG</code>. If you want to match against the filetype option, then use the <code>FileType</code> event.</p>
<p>I tend to write multi-... | <p>In <code>:au Event pattern command</code>, the pattern is usually matched against the buffer name. Instead of <code>BufRead gitcommit</code>, you could use <code>BufRead COMMIT_EDITMSG</code>. If you want to match against the filetype option, then use the <code>FileType</code> event.</p> <p>I tend to write multi-... | 119, 370 | git, vim | <h1>Entering insert mode automatically when editing git commit messages</h1>
<p>If I do a <code>git commit</code>, when Vim opens, I want to be in insert mode straight away.</p>
<p>I noticed that the <code>filetype</code> is set to <code>gitcommit</code> when editing, so I thought I could achieve this with an autocomm... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 22,927 | git | # Entering insert mode automatically when editing git commit messages
If I do a `git commit`, when Vim opens, I want to be in insert mode straight away.
I noticed that the `filetype` is set to `gitcommit` when editing, so I thought I could achieve this with an autocommand.
```
au BufRead gitcommit startinsert!
```
... | In `:au Event pattern command`, the pattern is usually matched against the buffer name. Instead of `BufRead gitcommit`, you could use `BufRead COMMIT_EDITMSG`. If you want to match against the filetype option, then use the `FileType` event.
I tend to write multi-line commit messages, and I have an autocommand (from vi... |
14676529 | What does 'track' mean when creating a new branch in git? | 16 | 2013-02-03 19:48:02 | <p>I'm using Aptana and Git. When I go to create a new branch, the following dialog box shows up.</p>
<p><img src="https://i.sstatic.net/ALISe.png" alt="enter image description here"></p>
<p>I was wondering what that 'track' checkbox does, and when it's most appropriate to check it.</p>
<p>I understand the concept ... | 5,026 | 1,230,167 | 2013-03-22 01:18:09 | 14,676,556 | 12 | 2013-02-03 19:51:08 | 1,451,820 | 2013-02-03 19:51:08 | https://stackoverflow.com/q/14676529 | https://stackoverflow.com/a/14676556 | <p>In this case, <code>track</code> refers to git-checkout's and git-branch's <code>--track</code> option.</p>
<p>When a local branch is started off a remote-tracking branch, git sets up the branch so that <code>git pull</code> will appropriately merge from the remote-tracking branch.</p>
<p>From <code>man git-branch... | <p>In this case, <code>track</code> refers to git-checkout's and git-branch's <code>--track</code> option.</p> <p>When a local branch is started off a remote-tracking branch, git sets up the branch so that <code>git pull</code> will appropriately merge from the remote-tracking branch.</p> <p>From <code>man git-branch... | 52, 119 | aptana, git | <h1>What does 'track' mean when creating a new branch in git?</h1>
<p>I'm using Aptana and Git. When I go to create a new branch, the following dialog box shows up.</p>
<p><img src="https://i.sstatic.net/ALISe.png" alt="enter image description here"></p>
<p>I was wondering what that 'track' checkbox does, and when i... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 22,928 | git | # What does 'track' mean when creating a new branch in git?
I'm using Aptana and Git. When I go to create a new branch, the following dialog box shows up.

I was wondering what that 'track' checkbox does, and when it's most appropriate to check it.
I u... | In this case, `track` refers to git-checkout's and git-branch's `--track` option.
When a local branch is started off a remote-tracking branch, git sets up the branch so that `git pull` will appropriately merge from the remote-tracking branch.
From `man git-branch`:
> ```
> -t, --track
> When creating a new branc... |
10627389 | Diff current file version and previous one remote repository | 16 | 2012-05-16 22:02:34 | <p>How do I diff my working file version vs. some previous version in the remote repository?</p>
<p>Say, I pull today, perform 6 - 8 commits to my local copy and then want to see the diff between my latest working version ( of a given file ) and the latest on the remote or any other version. </p>
| 19,995 | 20,654 | 2014-01-28 06:33:27 | 10,627,431 | 12 | 2012-05-16 22:06:01 | 229,044 | 2012-05-16 22:06:01 | https://stackoverflow.com/q/10627389 | https://stackoverflow.com/a/10627431 | <p>If you're talking about a remote branch, say, <code>origin/master</code>, you can use <code>~</code> and <code>^</code> to refer to ancestor commits relative to a branch the same way you can with local branches:</p>
<pre><code># what change was introduced to origin/master in the last 4 commits?
git diff origin/mast... | <p>If you're talking about a remote branch, say, <code>origin/master</code>, you can use <code>~</code> and <code>^</code> to refer to ancestor commits relative to a branch the same way you can with local branches:</p> <pre><code># what change was introduced to origin/master in the last 4 commits? git diff origin/mast... | 119, 606 | diff, git | <h1>Diff current file version and previous one remote repository</h1>
<p>How do I diff my working file version vs. some previous version in the remote repository?</p>
<p>Say, I pull today, perform 6 - 8 commits to my local copy and then want to see the diff between my latest working version ( of a given file ) and the... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 22,929 | git | # Diff current file version and previous one remote repository
How do I diff my working file version vs. some previous version in the remote repository?
Say, I pull today, perform 6 - 8 commits to my local copy and then want to see the diff between my latest working version ( of a given file ) and the latest on the r... | If you're talking about a remote branch, say, `origin/master`, you can use `~` and `^` to refer to ancestor commits relative to a branch the same way you can with local branches:
```
# what change was introduced to origin/master in the last 4 commits?
git diff origin/master origin/master~3
```
If you want to diff you... |
9627198 | Stop a git commit by a specific author using pre-commit hook | 16 | 2012-03-09 00:26:09 | <p>My plan is to use git to keep track of changes in /etc but when committing I want to have the person making the change specify themselves as author by adding the --author option on the commandline.</p>
<p>So I would like to stop accidental commits as root.</p>
<p>I tried creating this pre-commit hook but it is no... | 7,029 | 990,524 | 2020-04-04 01:04:31 | 9,629,729 | 12 | 2012-03-09 06:13:23 | 712,605 | 2020-04-04 01:04:31 | https://stackoverflow.com/q/9627198 | https://stackoverflow.com/a/9629729 | <p>Until v1.7.10.1 (released 2012-05-01), Git did not make <code>--author</code> information available to Git hooks via environment variables, command-line arguments, or stdin. However, instead of requiring the use of the <code>--author</code> command line, you can instruct users to set the <code>GIT_AUTHOR_NAME</code... | <p>Until v1.7.10.1 (released 2012-05-01), Git did not make <code>--author</code> information available to Git hooks via environment variables, command-line arguments, or stdin. However, instead of requiring the use of the <code>--author</code> command line, you can instruct users to set the <code>GIT_AUTHOR_NAME</code... | 119, 853, 14000 | git, hook, pre-commit | <h1>Stop a git commit by a specific author using pre-commit hook</h1>
<p>My plan is to use git to keep track of changes in /etc but when committing I want to have the person making the change specify themselves as author by adding the --author option on the commandline.</p>
<p>So I would like to stop accidental commi... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 22,930 | git | # Stop a git commit by a specific author using pre-commit hook
My plan is to use git to keep track of changes in /etc but when committing I want to have the person making the change specify themselves as author by adding the --author option on the commandline.
So I would like to stop accidental commits as root.
I tr... | Until v1.7.10.1 (released 2012-05-01), Git did not make `--author` information available to Git hooks via environment variables, command-line arguments, or stdin. However, instead of requiring the use of the `--author` command line, you can instruct users to set the `GIT_AUTHOR_NAME` and `GIT_AUTHOR_EMAIL` environment ... |
7238426 | Understanding git submodule and "freezing" it at a specific commit hash or version | 16 | 2011-08-30 03:39:48 | <p>Assuming the following project layout:-</p>
<pre><code>mainrepo_git
|____ .git
|____ .gitmodules
|____ proj <------- directory containing the code files for mainrepo
|____ 3rdpartysourcecode <-- directory containing upstream open source code
| |____ .git
... | 17,847 | 482,506 | 2011-08-30 05:34:18 | 7,238,574 | 12 | 2011-08-30 04:09:45 | 389,146 | 2011-08-30 04:09:45 | https://stackoverflow.com/q/7238426 | https://stackoverflow.com/a/7238574 | <p>Freezing is the whole point of submodules. You should really read a tutorial on it. In a nutshell, <code>git add 3rdpartysourcecode</code> (important no trailing slash!) followed by a commit locks the currently checked out submodule commit to the supermodule commit. Then later you use <code>git submodule update</... | <p>Freezing is the whole point of submodules. You should really read a tutorial on it. In a nutshell, <code>git add 3rdpartysourcecode</code> (important no trailing slash!) followed by a commit locks the currently checked out submodule commit to the supermodule commit. Then later you use <code>git submodule update</... | 119, 41612 | git, git-submodules | <h1>Understanding git submodule and "freezing" it at a specific commit hash or version</h1>
<p>Assuming the following project layout:-</p>
<pre><code>mainrepo_git
|____ .git
|____ .gitmodules
|____ proj <------- directory containing the code files for mainrepo
|____ 3rdpartysource... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 22,931 | git | # Understanding git submodule and "freezing" it at a specific commit hash or version
Assuming the following project layout:-
```
mainrepo_git
|____ .git
|____ .gitmodules
|____ proj <------- directory containing the code files for mainrepo
|____ 3rdpartysourcecode <-- directory cont... | Freezing is the whole point of submodules. You should really read a tutorial on it. In a nutshell, `git add 3rdpartysourcecode` (important no trailing slash!) followed by a commit locks the currently checked out submodule commit to the supermodule commit. Then later you use `git submodule update` to check out that revi... |
6807149 | GIT: how to force a merge commit to an ancestor | 16 | 2011-07-24 13:48:02 | <p>In GIT, I have two branches and two commits:</p>
<pre><code> A(master)---B(branch "topic")
</code></pre>
<ul>
<li>the HEAD of the branch 'master' is commit A</li>
<li>the HEAD of the branch 'topic' is commit B</li>
<li>commit A is the parent of commit B</li>
</ul>
<p>I would like to create a merge commit C in th... | 9,714 | 860,261 | 2018-04-07 18:26:47 | 6,807,602 | 12 | 2011-07-24 15:06:50 | 104,344 | 2011-07-24 15:22:11 | https://stackoverflow.com/q/6807149 | https://stackoverflow.com/a/6807602 | <p><strong>UPD</strong>: Cleaner way to do same thing without messing with sha1 directly:</p>
<pre><code>$ echo "merge commit" | git commit-tree topic^{tree} -p master -p topic
4201b6abae6bb06f929ea00fbc35019679d55535
$ git merge 4201b6abae6bb06f929ea00fbc35019679d55535
Updating b826a8e..4201b6a
Fast-forward
</code><... | <p><strong>UPD</strong>: Cleaner way to do same thing without messing with sha1 directly:</p> <pre><code>$ echo "merge commit" | git commit-tree topic^{tree} -p master -p topic 4201b6abae6bb06f929ea00fbc35019679d55535 $ git merge 4201b6abae6bb06f929ea00fbc35019679d55535 Updating b826a8e..4201b6a Fast-forward </code><... | 119, 717, 5597 | commit, git, merge | <h1>GIT: how to force a merge commit to an ancestor</h1>
<p>In GIT, I have two branches and two commits:</p>
<pre><code> A(master)---B(branch "topic")
</code></pre>
<ul>
<li>the HEAD of the branch 'master' is commit A</li>
<li>the HEAD of the branch 'topic' is commit B</li>
<li>commit A is the parent of commit B</li... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 22,932 | git | # GIT: how to force a merge commit to an ancestor
In GIT, I have two branches and two commits:
```
A(master)---B(branch "topic")
```
- the HEAD of the branch 'master' is commit A
- the HEAD of the branch 'topic' is commit B
- commit A is the parent of commit B
I would like to create a merge commit C in the "topic"... | **UPD**: Cleaner way to do same thing without messing with sha1 directly:
```
$ echo "merge commit" | git commit-tree topic^{tree} -p master -p topic
4201b6abae6bb06f929ea00fbc35019679d55535
$ git merge 4201b6abae6bb06f929ea00fbc35019679d55535
Updating b826a8e..4201b6a
Fast-forward
```
Or even one-line command:
```... |
5712133 | Change root of a branch in git | 16 | 2011-04-19 05:50:43 | <p>I'm using git and want to change the base of an exiting branch. This is caused by a deployment system, which pulls this explicit branch into my production environment. When planning my releases, I create a tag every time I want to go live. But my branch has special changes too, so <code>git reset --hard v1.0</code> ... | 24,661 | 330,569 | 2016-02-25 22:49:33 | 5,712,184 | 12 | 2011-04-19 05:58:20 | 6,309 | 2011-04-19 06:07:45 | https://stackoverflow.com/q/5712133 | https://stackoverflow.com/a/5712184 | <p><a href="http://git-scm.com/docs/git-rebase" rel="noreferrer"><code>git rebase</code></a> should, like you say, allow you to change the base of deploy:</p>
<pre><code>git checkout deploy
git rebase v1.1 # using the tag
(or:
git rebase J # SHA1 of J
or
git rebase master~1
)
</code></pre>
<p>But you will end up w... | <p><a href="http://git-scm.com/docs/git-rebase" rel="noreferrer"><code>git rebase</code></a> should, like you say, allow you to change the base of deploy:</p> <pre><code>git checkout deploy git rebase v1.1 # using the tag (or: git rebase J # SHA1 of J or git rebase master~1 ) </code></pre> <p>But you will end up w... | 115, 119, 1879, 8974, 12626 | branch, git, rebase, reset, tags | <h1>Change root of a branch in git</h1>
<p>I'm using git and want to change the base of an exiting branch. This is caused by a deployment system, which pulls this explicit branch into my production environment. When planning my releases, I create a tag every time I want to go live. But my branch has special changes too... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 22,933 | git | # Change root of a branch in git
I'm using git and want to change the base of an exiting branch. This is caused by a deployment system, which pulls this explicit branch into my production environment. When planning my releases, I create a tag every time I want to go live. But my branch has special changes too, so `git... | [`git rebase`](http://git-scm.com/docs/git-rebase) should, like you say, allow you to change the base of deploy:
```
git checkout deploy
git rebase v1.1 # using the tag
(or:
git rebase J # SHA1 of J
or
git rebase master~1
)
```
But you will end up with
```
C'---D'---E' deploy
```
That is, the SHA1 of the commits... |
4585776 | Installing Hg-Git on Windows 7 64bit | 16 | 2011-01-03 15:34:15 | <p>I am trying for a while installing <a href="http://hg-git.github.com/" rel="noreferrer">Hg-Git addon</a> to my Windows 7 Operating system </p>
<ol>
<li><p>I have crossed several difficulties like installing Python and other utilities described in <a href="http://blog.sadphaeton.com/2009/01/20/python-development-win... | 7,239 | 559,792 | 2018-02-27 14:31:53 | 4,611,092 | 12 | 2011-01-06 01:55:06 | 559,792 | 2016-02-11 22:44:43 | https://stackoverflow.com/q/4585776 | https://stackoverflow.com/a/4611092 | <p>Ok i got it so ... For others - you need to clone this repo </p>
<p><strong>HTTPS:</strong></p>
<pre><code>git clone https://github.com/jelmer/dulwich.git
</code></pre>
<p><strong>SSH:</strong></p>
<pre><code>git clone git@github.com:jelmer/dulwich.git
</code></pre>
<p>or just download source - after that you n... | <p>Ok i got it so ... For others - you need to clone this repo </p> <p><strong>HTTPS:</strong></p> <pre><code>git clone https://github.com/jelmer/dulwich.git </code></pre> <p><strong>SSH:</strong></p> <pre><code>git clone git@github.com:jelmer/dulwich.git </code></pre> <p>or just download source - after that you n... | 119, 51230, 62895 | git, hg-git, mercurial-extension | <h1>Installing Hg-Git on Windows 7 64bit</h1>
<p>I am trying for a while installing <a href="http://hg-git.github.com/" rel="noreferrer">Hg-Git addon</a> to my Windows 7 Operating system </p>
<ol>
<li><p>I have crossed several difficulties like installing Python and other utilities described in <a href="http://blog.sa... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 22,934 | git | # Installing Hg-Git on Windows 7 64bit
I am trying for a while installing [Hg-Git addon](http://hg-git.github.com/) to my Windows 7 Operating system
1. I have crossed several difficulties like installing Python and other utilities described in [this blog](http://blog.sadphaeton.com/2009/01/20/python-development-windo... | Ok i got it so ... For others - you need to clone this repo
**HTTPS:**
```
git clone https://github.com/jelmer/dulwich.git
```
**SSH:**
```
git clone git@github.com:jelmer/dulwich.git
```
or just download source - after that you need to go to its folder when you downloaded in command line type:
```
python setup.p... |
3036817 | In git, how do I check out a remote repository's remote branches? | 16 | 2010-06-14 11:29:46 | <p>I have a local repository cloned from a bare remote repository. The following command lists al the remote repository's branches.</p>
<pre><code>$ git ls-remote <remote>
74bd3eb190edb39db04f6c0c4dbbb9e1e96bc6db refs/remotes/test
85de54d6ae813c624b9623983e6b0a4948dae0fe refs/remotes/trunk
</code></pre>
... | 9,213 | 8,683 | 2010-06-14 13:08:46 | 3,037,062 | 12 | 2010-06-14 12:09:06 | 193,688 | 2010-06-14 13:08:46 | https://stackoverflow.com/q/3036817 | https://stackoverflow.com/a/3037062 | <p>You can fetch any ref from any remote (as long as the server is willing to give it to you). The key to fetching refs outside <code>refs/heads/</code> is to supply full ref paths that start with <code>refs/</code>. If desired, you can even pull from repositories that are not configured as remotes (<em>git fetch</em> ... | <p>You can fetch any ref from any remote (as long as the server is willing to give it to you). The key to fetching refs outside <code>refs/heads/</code> is to supply full ref paths that start with <code>refs/</code>. If desired, you can even pull from repositories that are not configured as remotes (<em>git fetch</em> ... | 119 | git | <h1>In git, how do I check out a remote repository's remote branches?</h1>
<p>I have a local repository cloned from a bare remote repository. The following command lists al the remote repository's branches.</p>
<pre><code>$ git ls-remote <remote>
74bd3eb190edb39db04f6c0c4dbbb9e1e96bc6db refs/remotes/test
85d... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 22,935 | git | # In git, how do I check out a remote repository's remote branches?
I have a local repository cloned from a bare remote repository. The following command lists al the remote repository's branches.
```
$ git ls-remote <remote>
74bd3eb190edb39db04f6c0c4dbbb9e1e96bc6db refs/remotes/test
85de54d6ae813c624b9623983e6b0... | You can fetch any ref from any remote (as long as the server is willing to give it to you). The key to fetching refs outside `refs/heads/` is to supply full ref paths that start with `refs/`. If desired, you can even pull from repositories that are not configured as remotes (*git fetch* can take a URL instead of a remo... |
1939635 | How can I detect copy & pasted code using git? | 16 | 2009-12-21 11:41:04 | <p>I just read the <a href="http://kernel.org/pub/software/scm/git/docs/git-blame.html" rel="noreferrer">git-blame</a> manual page once more and noticed this part:</p>
<blockquote>
<p>A particularly useful way is to see if an added file has lines created by copy-and-paste from existing files. Sometimes this indicate... | 8,133 | 91,757 | 2024-05-23 22:06:31 | 1,940,549 | 12 | 2009-12-21 14:55:06 | 28,804 | 2009-12-21 14:55:06 | https://stackoverflow.com/q/1939635 | https://stackoverflow.com/a/1940549 | <p>You can break the commands down individually.</p>
<pre><code>$ git log --diff-filter=A --pretty=short -- foo
</code></pre>
<p>displays the log for the file "foo". The <code>--diff-filter</code> option only shows commits in which files were added ("A"), and shows it in a condensed format (the <code>--pretty=short</... | <p>You can break the commands down individually.</p> <pre><code>$ git log --diff-filter=A --pretty=short -- foo </code></pre> <p>displays the log for the file "foo". The <code>--diff-filter</code> option only shows commits in which files were added ("A"), and shows it in a condensed format (the <code>--pretty=short</... | 119, 5098 | copy-paste, git | <h1>How can I detect copy & pasted code using git?</h1>
<p>I just read the <a href="http://kernel.org/pub/software/scm/git/docs/git-blame.html" rel="noreferrer">git-blame</a> manual page once more and noticed this part:</p>
<blockquote>
<p>A particularly useful way is to see if an added file has lines created by cop... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 22,936 | git | # How can I detect copy & pasted code using git?
I just read the [git-blame](http://kernel.org/pub/software/scm/git/docs/git-blame.html) manual page once more and noticed this part:
> A particularly useful way is to see if an added file has lines created by copy-and-paste from existing files. Sometimes this indicates... | You can break the commands down individually.
```
$ git log --diff-filter=A --pretty=short -- foo
```
displays the log for the file "foo". The `--diff-filter` option only shows commits in which files were added ("A"), and shows it in a condensed format (the `--pretty=short` option). (The `--` is a standard for saying... |
66206530 | RPC failed: curl 56 failure when receiving data from the peer | 15 | 2021-02-15 10:42:46 | <p>I have just created a small corporate repository on Azure ( 1 commit per each of 2 branches, totall about 200mb of repo), then I deleted local repository. When I try to clone it to my local machine back( I assume proxy might be an issue here ) I get:</p>
<pre><code>RPC failed: curl 56 failure when receiving data fro... | 72,261 | 12,571,942 | 2025-04-14 06:16:20 | 66,207,817 | 12 | 2021-02-15 12:12:30 | 8,705,432 | 2021-02-15 12:12:30 | https://stackoverflow.com/q/66206530 | https://stackoverflow.com/a/66207817 | <p>This error message means that your machine was unable to receive all of the data from the remote side. It could be that the other side hung up or the connection was interrupted; it's really not possible to say without more information.</p>
<p>If you're using a proxy, then yes, that's likely the problem. Unfortunat... | <p>This error message means that your machine was unable to receive all of the data from the remote side. It could be that the other side hung up or the connection was interrupted; it's really not possible to say without more information.</p> <p>If you're using a proxy, then yes, that's likely the problem. Unfortunat... | 119, 14158 | azure, git | <h1>RPC failed: curl 56 failure when receiving data from the peer</h1>
<p>I have just created a small corporate repository on Azure ( 1 commit per each of 2 branches, totall about 200mb of repo), then I deleted local repository. When I try to clone it to my local machine back( I assume proxy might be an issue here ) I ... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 22,937 | git | # RPC failed: curl 56 failure when receiving data from the peer
I have just created a small corporate repository on Azure ( 1 commit per each of 2 branches, totall about 200mb of repo), then I deleted local repository. When I try to clone it to my local machine back( I assume proxy might be an issue here ) I get:
```... | This error message means that your machine was unable to receive all of the data from the remote side. It could be that the other side hung up or the connection was interrupted; it's really not possible to say without more information.
If you're using a proxy, then yes, that's likely the problem. Unfortunately, proxie... |
63342780 | How can I decide to add .idea/jarRepositories.xml in .gitignore | 15 | 2020-08-10 15:01:59 | <p>I found an unfamiliar file <code>.idea/jarRepositories.xml</code>, when I updated Android Studio <code>3.5.3</code> to <code>4.0.1</code> on Mac. The content is as follows:</p>
<pre><code><?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="... | 5,144 | 9,298,629 | 2020-08-23 08:33:08 | 63,544,057 | 12 | 2020-08-23 06:27:57 | 9,298,629 | 2020-08-23 06:49:59 | https://stackoverflow.com/q/63342780 | https://stackoverflow.com/a/63544057 | <p>The file <code>.idea/jarRepositories.xml</code> should be added to <code>.gitignore</code>. It is auto-generated and has only redundant information about <a href="https://www.jetbrains.com/help/idea/library.html#configure-custom-remote-repo" rel="noreferrer">remote jar repositories</a>.</p>
<p>Our Android projects d... | <p>The file <code>.idea/jarRepositories.xml</code> should be added to <code>.gitignore</code>. It is auto-generated and has only redundant information about <a href="https://www.jetbrains.com/help/idea/library.html#configure-custom-remote-repo" rel="noreferrer">remote jar repositories</a>.</p> <p>Our Android projects d... | 1386, 25056, 41127, 91905, 125955 | android, android-studio, auto-import, gitignore, maven | <h1>How can I decide to add .idea/jarRepositories.xml in .gitignore</h1>
<p>I found an unfamiliar file <code>.idea/jarRepositories.xml</code>, when I updated Android Studio <code>3.5.3</code> to <code>4.0.1</code> on Mac. The content is as follows:</p>
<pre><code><?xml version="1.0" encoding="UTF-8&qu... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 22,938 | git | # How can I decide to add .idea/jarRepositories.xml in .gitignore
I found an unfamiliar file `.idea/jarRepositories.xml`, when I updated Android Studio `3.5.3` to `4.0.1` on Mac. The content is as follows:
```
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="RemoteRepositoriesConfigurat... | The file `.idea/jarRepositories.xml` should be added to `.gitignore`. It is auto-generated and has only redundant information about [remote jar repositories](https://www.jetbrains.com/help/idea/library.html#configure-custom-remote-repo).
Our Android projects define those repositories in the project-level `build.gradle... |
53587814 | Git - Squash All Commits in History Before Specific Commit | 15 | 2018-12-03 05:12:14 | <p>I have a Mercurial repo that I am converting to Git. The commit history is quite large and I do not need all of the commit history in the new repo. Once I convert the commit history to Git (and before pushing to the new repo), I want to squash all the commits before a certain tag into one commit.</p>
<p>So, if I ha... | 6,704 | 713,861 | 2025-06-19 08:56:40 | 53,589,816 | 12 | 2018-12-03 08:16:08 | 1,256,452 | 2021-02-20 19:46:59 | https://stackoverflow.com/q/53587814 | https://stackoverflow.com/a/53589816 | <p>The other answers so far suggest rebase. This <em>can</em> work, in some cases, depending on the commit graph in the converted-to-Git repository. The new fancier rebase with <code>--rebase-merges</code> can definitely do it. But it's kind of a clumsy way to go about it. The ideal way to do this is to convert com... | <p>The other answers so far suggest rebase. This <em>can</em> work, in some cases, depending on the commit graph in the converted-to-Git repository. The new fancier rebase with <code>--rebase-merges</code> can definitely do it. But it's kind of a clumsy way to go about it. The ideal way to do this is to convert com... | 119 | git | <h1>Git - Squash All Commits in History Before Specific Commit</h1>
<p>I have a Mercurial repo that I am converting to Git. The commit history is quite large and I do not need all of the commit history in the new repo. Once I convert the commit history to Git (and before pushing to the new repo), I want to squash all t... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 22,941 | git | # Git - Squash All Commits in History Before Specific Commit
I have a Mercurial repo that I am converting to Git. The commit history is quite large and I do not need all of the commit history in the new repo. Once I convert the commit history to Git (and before pushing to the new repo), I want to squash all the commit... | The other answers so far suggest rebase. This *can* work, in some cases, depending on the commit graph in the converted-to-Git repository. The new fancier rebase with `--rebase-merges` can definitely do it. But it's kind of a clumsy way to go about it. The ideal way to do this is to convert commits *starting at the fir... |
44144750 | In Git, how to commit file once, but ignore further changes to the file | 15 | 2017-05-23 20:50:06 | <p>I have a log file <code>errors.log</code> which the software uses to report errors. The software does not create <code>errors.log</code> by itself, so the file must exist before hand.</p>
<p>The problem is, if I add it to <code>.gitignore</code> then developers would need to create it manually on their machines. If... | 6,203 | 6,794,772 | 2017-05-25 10:08:16 | 44,144,808 | 12 | 2017-05-23 20:53:42 | 7,128,034 | 2017-05-24 12:31:30 | https://stackoverflow.com/q/44144750 | https://stackoverflow.com/a/44144808 | <blockquote>
<p>Update</p>
</blockquote>
<p>The best way for this case is <code>skip-worktree</code></p>
<p>skip-worktree, according <a href="https://stackoverflow.com/questions/13630849/git-difference-between-assume-unchanged-and-skip-worktree/13631525#13631525">this answer</a> even where git knows that the file h... | <blockquote> <p>Update</p> </blockquote> <p>The best way for this case is <code>skip-worktree</code></p> <p>skip-worktree, according <a href="https://stackoverflow.com/questions/13630849/git-difference-between-assume-unchanged-and-skip-worktree/13631525#13631525">this answer</a> even where git knows that the file h... | 119 | git | <h1>In Git, how to commit file once, but ignore further changes to the file</h1>
<p>I have a log file <code>errors.log</code> which the software uses to report errors. The software does not create <code>errors.log</code> by itself, so the file must exist before hand.</p>
<p>The problem is, if I add it to <code>.gitign... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 22,942 | git | # In Git, how to commit file once, but ignore further changes to the file
I have a log file `errors.log` which the software uses to report errors. The software does not create `errors.log` by itself, so the file must exist before hand.
The problem is, if I add it to `.gitignore` then developers would need to create i... | > Update
The best way for this case is `skip-worktree`
skip-worktree, according [this answer](https://stackoverflow.com/questions/13630849/git-difference-between-assume-unchanged-and-skip-worktree/13631525#13631525) even where git knows that the file has been modified (or needs to be modified by a reset --hard or the... |
15516168 | How to cross-compile Git for ARM? | 15 | 2013-03-20 05:41:36 | <p>Unfortunately, I am having difficulty cross-compiling Git for the ARMv6 architecture.</p>
<p>But before I begin describing the steps I've taken and commands I've entered, I should briefly describe the build environment:</p>
<ul>
<li>I am cross-compiling on Ubuntu 12.10 64-bit.</li>
<li>The cross compiler is instal... | 7,603 | 193,619 | 2020-10-16 16:33:50 | 15,516,505 | 12 | 2013-03-20 06:10:26 | 152,948 | 2013-03-20 06:22:51 | https://stackoverflow.com/q/15516168 | https://stackoverflow.com/a/15516505 | <p>The macro that's failing is <code>ST_MTIME_NSEC</code> in <code>git-compat-util.h</code>. This macro is controlled by the macros <code>USE_NSEC</code>, <code>NO_NSEC</code> and <code>USE_ST_TIMESPEC</code>, which are provided on the build commandline or by <code>config.mak.uname</code>, not by configure.</p>
<p>It ... | <p>The macro that's failing is <code>ST_MTIME_NSEC</code> in <code>git-compat-util.h</code>. This macro is controlled by the macros <code>USE_NSEC</code>, <code>NO_NSEC</code> and <code>USE_ST_TIMESPEC</code>, which are provided on the build commandline or by <code>config.mak.uname</code>, not by configure.</p> <p>It ... | 119, 1102, 11282 | autoconf, cross-compiling, git | <h1>How to cross-compile Git for ARM?</h1>
<p>Unfortunately, I am having difficulty cross-compiling Git for the ARMv6 architecture.</p>
<p>But before I begin describing the steps I've taken and commands I've entered, I should briefly describe the build environment:</p>
<ul>
<li>I am cross-compiling on Ubuntu 12.10 64... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 22,944 | git | # How to cross-compile Git for ARM?
Unfortunately, I am having difficulty cross-compiling Git for the ARMv6 architecture.
But before I begin describing the steps I've taken and commands I've entered, I should briefly describe the build environment:
- I am cross-compiling on Ubuntu 12.10 64-bit.
- The cross compiler ... | The macro that's failing is `ST_MTIME_NSEC` in `git-compat-util.h`. This macro is controlled by the macros `USE_NSEC`, `NO_NSEC` and `USE_ST_TIMESPEC`, which are provided on the build commandline or by `config.mak.uname`, not by configure.
It *should* be that if no options are provided, git doesn't attempt to use nano... |
11741249 | What is the difference between git subtree merge and git-subtree | 15 | 2012-07-31 13:29:10 | <p>I've just found git-subtree tool that some time ago became a part of main git repo
<a href="https://github.com/apenwarr/git-subtree/" rel="noreferrer">https://github.com/apenwarr/git-subtree/</a></p>
<p>However I don't fully understand what functionality does this tool provide over the already existing "git read-tr... | 8,382 | 220,474 | 2022-02-20 10:29:10 | 11,742,367 | 12 | 2012-07-31 14:24:16 | 877,115 | 2012-07-31 14:24:16 | https://stackoverflow.com/q/11741249 | https://stackoverflow.com/a/11742367 | <p>The commands you describe reads a subtree into a repository. The <code>git-subtree</code> command has many more options, as described by <a href="https://github.com/gitster/git/blob/master/contrib/subtree/git-subtree.txt" rel="noreferrer">the documentation.</a> Among others, you can (annotated for simplicity):</p>
... | <p>The commands you describe reads a subtree into a repository. The <code>git-subtree</code> command has many more options, as described by <a href="https://github.com/gitster/git/blob/master/contrib/subtree/git-subtree.txt" rel="noreferrer">the documentation.</a> Among others, you can (annotated for simplicity):</p> ... | 119, 28897, 68200 | git, git-merge, git-subtree | <h1>What is the difference between git subtree merge and git-subtree</h1>
<p>I've just found git-subtree tool that some time ago became a part of main git repo
<a href="https://github.com/apenwarr/git-subtree/" rel="noreferrer">https://github.com/apenwarr/git-subtree/</a></p>
<p>However I don't fully understand what f... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 22,945 | git | # What is the difference between git subtree merge and git-subtree
I've just found git-subtree tool that some time ago became a part of main git repo
<https://github.com/apenwarr/git-subtree/>
However I don't fully understand what functionality does this tool provide over the already existing "git read-tree" + "git m... | The commands you describe reads a subtree into a repository. The `git-subtree` command has many more options, as described by [the documentation.](https://github.com/gitster/git/blob/master/contrib/subtree/git-subtree.txt) Among others, you can (annotated for simplicity):
```
add::
Create the <prefix> subtree by i... |
6553743 | switching between branches where a subdirectory was in the main repo vs. submodularized | 15 | 2011-07-01 22:19:53 | <p>We've made a subdirectory S into a separate repo and re-added it as a submodule in a branch B. Now when I want to switch back to the original branch A, where the subdirectory was checked into the original repo, git complains that the stuff from the submodule is untracked and has to be moved away first. Can we swit... | 10,634 | 95,078 | 2011-07-02 04:37:04 | 6,555,146 | 12 | 2011-07-02 04:37:04 | 193,688 | 2011-07-02 04:37:04 | https://stackoverflow.com/q/6553743 | https://stackoverflow.com/a/6555146 | <p>Your history looks something like this:</p>
<pre><code>---X A
\
Y B
</code></pre>
<p><code>git ls-tree A</code> shows (e.g.):</p>
<pre><code>040000 tree 48770cdc854cc14fecc71029180be7a979f4baa1 S
100644 blob beac6e189b7c69b249271b52cd2db5e418c05a50 file
</code></pre>
<p><code>git ls-tree A:S... | <p>Your history looks something like this:</p> <pre><code>---X A \ Y B </code></pre> <p><code>git ls-tree A</code> shows (e.g.):</p> <pre><code>040000 tree 48770cdc854cc14fecc71029180be7a979f4baa1 S 100644 blob beac6e189b7c69b249271b52cd2db5e418c05a50 file </code></pre> <p><code>git ls-tree A:S... | 119, 41612 | git, git-submodules | <h1>switching between branches where a subdirectory was in the main repo vs. submodularized</h1>
<p>We've made a subdirectory S into a separate repo and re-added it as a submodule in a branch B. Now when I want to switch back to the original branch A, where the subdirectory was checked into the original repo, git comp... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 22,948 | git | # switching between branches where a subdirectory was in the main repo vs. submodularized
We've made a subdirectory S into a separate repo and re-added it as a submodule in a branch B. Now when I want to switch back to the original branch A, where the subdirectory was checked into the original repo, git complains that... | Your history looks something like this:
```
---X A
\
Y B
```
`git ls-tree A` shows (e.g.):
```
040000 tree 48770cdc854cc14fecc71029180be7a979f4baa1 S
100644 blob beac6e189b7c69b249271b52cd2db5e418c05a50 file
```
`git ls-tree A:S` shows (e.g.):
```
100644 blob 6357df9903460c9e8b43311aff3c7a6fd7... |
3240436 | Git recover uncommitted changes | 15 | 2010-07-13 18:56:29 | <p>I had a lot of local changes.</p>
<p>I just accidentally did</p>
<pre><code>git merge another_branch
git reset --hard HEAD^
</code></pre>
<p>on a lot of work. :( with the intention I didn't want the merged changes in here.</p>
<p>How do I recover the original state? </p>
<p>No, the local changes were never comm... | 29,023 | 55,562 | 2022-05-15 00:16:28 | 3,240,470 | 12 | 2010-07-13 18:59:12 | 198,244 | 2022-05-15 00:08:31 | https://stackoverflow.com/q/3240436 | https://stackoverflow.com/a/3240470 | <p>If the changes had never been committed, stashed, or staged, then you're out of luck. If they have, then you should be able to get your changes back by looking for them in <code>git reflog</code>.</p>
| <p>If the changes had never been committed, stashed, or staged, then you're out of luck. If they have, then you should be able to get your changes back by looking for them in <code>git reflog</code>.</p> | 119, 12351 | git, recover | <h1>Git recover uncommitted changes</h1>
<p>I had a lot of local changes.</p>
<p>I just accidentally did</p>
<pre><code>git merge another_branch
git reset --hard HEAD^
</code></pre>
<p>on a lot of work. :( with the intention I didn't want the merged changes in here.</p>
<p>How do I recover the original state? </p>
... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 22,949 | git | # Git recover uncommitted changes
I had a lot of local changes.
I just accidentally did
```
git merge another_branch
git reset --hard HEAD^
```
on a lot of work. :( with the intention I didn't want the merged changes in here.
How do I recover the original state?
No, the local changes were never committed/stashed.... | If the changes had never been committed, stashed, or staged, then you're out of luck. If they have, then you should be able to get your changes back by looking for them in `git reflog`. |
599341 | Programmatic git status | 15 | 2009-03-01 06:00:23 | <p>Does anyone know of a git plumbing (definitely not porcelain) means of determining whether:</p>
<ul>
<li>there are edits in the repo since the last commit, and</li>
<li>whether local HEAD is ahead of origin/HEAD</li>
</ul>
<p>I am looking to determine this programmatically, hence the desire to not solve this with ... | 4,491 | 14,356 | 2014-01-05 21:46:12 | 599,569 | 12 | 2009-03-01 09:51:40 | 6,309 | 2014-01-05 21:46:12 | https://stackoverflow.com/q/599341 | https://stackoverflow.com/a/599569 | <p>Update: as <a href="https://stackoverflow.com/a/17517443/6309">mentioned below</a> by <a href="https://stackoverflow.com/users/132312/toupeira">toupeira</a>, you can use the <code>--porcelain</code> option of <a href="http://git-scm.com/docs/git-status" rel="nofollow noreferrer">git status</a> (since commit 6f15787,... | <p>Update: as <a href="https://stackoverflow.com/a/17517443/6309">mentioned below</a> by <a href="https://stackoverflow.com/users/132312/toupeira">toupeira</a>, you can use the <code>--porcelain</code> option of <a href="http://git-scm.com/docs/git-status" rel="nofollow noreferrer">git status</a> (since commit 6f15787,... | 119 | git | <h1>Programmatic git status</h1>
<p>Does anyone know of a git plumbing (definitely not porcelain) means of determining whether:</p>
<ul>
<li>there are edits in the repo since the last commit, and</li>
<li>whether local HEAD is ahead of origin/HEAD</li>
</ul>
<p>I am looking to determine this programmatically, hence t... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 22,950 | git | # Programmatic git status
Does anyone know of a git plumbing (definitely not porcelain) means of determining whether:
- there are edits in the repo since the last commit, and
- whether local HEAD is ahead of origin/HEAD
I am looking to determine this programmatically, hence the desire to not solve this with porcelai... | Update: as [mentioned below](https://stackoverflow.com/a/17517443/6309) by [toupeira](https://stackoverflow.com/users/132312/toupeira), you can use the `--porcelain` option of [git status](http://git-scm.com/docs/git-status) (since commit 6f15787, September 2009, git 1.7.0).
I mentioned in my answer "[What does the te... |
62412563 | Prevent git from overwriting file owner upon git pull | 14 | 2020-06-16 15:52:01 | <p>I've seen a handful of similar questions on here, but none of the solutions given seem to be working... wondering if they're outdated, or this case is somehow different...so I wanted to open up a new thread to talk about it. </p>
<p>I've run into a frustrating problem where, every time I perform and <code>git pull<... | 5,419 | 5,161,457 | 2022-02-15 08:16:05 | 62,478,310 | 12 | 2020-06-19 20:45:14 | 484,674 | 2020-06-19 20:45:14 | https://stackoverflow.com/q/62412563 | https://stackoverflow.com/a/62478310 | <p>You are pretty close to the correct solution.</p>
<p>You need to enable the following hooks:</p>
<ul>
<li><code>post-merge</code>, called after a successful <code>git pull</code></li>
<li><code>post-checkout</code>, called after a successful <code>git checkout</code></li>
</ul>
<p>If you are sure to only use <cod... | <p>You are pretty close to the correct solution.</p> <p>You need to enable the following hooks:</p> <ul> <li><code>post-merge</code>, called after a successful <code>git pull</code></li> <li><code>post-checkout</code>, called after a successful <code>git checkout</code></li> </ul> <p>If you are sure to only use <cod... | 119, 28896, 43087, 75151, 92221 | file-ownership, git, githooks, git-pull, laravel | <h1>Prevent git from overwriting file owner upon git pull</h1>
<p>I've seen a handful of similar questions on here, but none of the solutions given seem to be working... wondering if they're outdated, or this case is somehow different...so I wanted to open up a new thread to talk about it. </p>
<p>I've run into a frus... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 22,952 | git | # Prevent git from overwriting file owner upon git pull
I've seen a handful of similar questions on here, but none of the solutions given seem to be working... wondering if they're outdated, or this case is somehow different...so I wanted to open up a new thread to talk about it.
I've run into a frustrating problem w... | You are pretty close to the correct solution.
You need to enable the following hooks:
- `post-merge`, called after a successful `git pull`
- `post-checkout`, called after a successful `git checkout`
If you are sure to only use `git pull`, the `post-merge` hook is enough.
Enabling both hooks guarantee you the hook ... |
52119937 | What is the difference between git cherry-pick and git format-patch | git am? | 14 | 2018-08-31 17:04:37 | <p>I sometimes need to cherry-pick a tag with a certain fix into my branch, and used to do so via</p>
<pre><code>git cherry-pick tags/myfix
</code></pre>
<p>This works, but cherry-picking takes an increasingly long time doing "inexact rename detection".</p>
<p>My hunch was that this could be faster with</p>
<pre><c... | 6,229 | 481,061 | 2022-06-16 21:28:14 | 52,120,407 | 12 | 2018-08-31 17:40:16 | 7,050,130 | 2021-12-19 23:34:04 | https://stackoverflow.com/q/52119937 | https://stackoverflow.com/a/52120407 | <p><code>cherry-pick</code> is implemented as a merge, with the merge base being the parent of the commit you're bringing in. In cases where there are no merge conflicts, this should have exactly the same effect as generating and applying the patch as you have (but see <a href="https://stackoverflow.com/a/52121093/705... | <p><code>cherry-pick</code> is implemented as a merge, with the merge base being the parent of the commit you're bringing in. In cases where there are no merge conflicts, this should have exactly the same effect as generating and applying the patch as you have (but see <a href="https://stackoverflow.com/a/52121093/705... | 119, 62078, 78810, 84451 | git, git-am, git-cherry-pick, git-patch | <h1>What is the difference between git cherry-pick and git format-patch | git am?</h1>
<p>I sometimes need to cherry-pick a tag with a certain fix into my branch, and used to do so via</p>
<pre><code>git cherry-pick tags/myfix
</code></pre>
<p>This works, but cherry-picking takes an increasingly long time doing "inex... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 22,956 | git | # What is the difference between git cherry-pick and git format-patch | git am?
I sometimes need to cherry-pick a tag with a certain fix into my branch, and used to do so via
```
git cherry-pick tags/myfix
```
This works, but cherry-picking takes an increasingly long time doing "inexact rename detection".
My hunch ... | `cherry-pick` is implemented as a merge, with the merge base being the parent of the commit you're bringing in. In cases where there are no merge conflicts, this should have exactly the same effect as generating and applying the patch as you have (but see [torek's answer](https://stackoverflow.com/a/52121093/7050130) f... |
48022325 | Git rebase process gets stuck with detached head | 14 | 2017-12-29 12:02:25 | <p>I'm trying on a certain project to reword the penultimate commit to fix a typo by running <code>git rebase -i HEAD~3</code>, (using the "nano" editor) then changing the default <code>pick</code> option of that commit to <code>r</code> or <code>reword</code> (on the initial rebase file window), and, without modifying... | 33,549 | 6,855,606 | 2024-09-19 09:26:13 | 48,058,744 | 12 | 2018-01-02 09:52:44 | 711,006 | 2018-01-02 17:10:11 | https://stackoverflow.com/q/48022325 | https://stackoverflow.com/a/48058744 | <p>The detached HEAD message appears normally when you put <code>edit</code> in the to-do file for the interactive rebase. You must have mistakenly put <code>edit</code> there instead of <code>reword</code>. Or Git might have entered this mode (which is also entered in conflicts) due to the error found in your output:<... | <p>The detached HEAD message appears normally when you put <code>edit</code> in the to-do file for the interactive rebase. You must have mistakenly put <code>edit</code> there instead of <code>reword</code>. Or Git might have entered this mode (which is also entered in conflicts) due to the error found in your output:<... | 119, 8974 | git, rebase | <h1>Git rebase process gets stuck with detached head</h1>
<p>I'm trying on a certain project to reword the penultimate commit to fix a typo by running <code>git rebase -i HEAD~3</code>, (using the "nano" editor) then changing the default <code>pick</code> option of that commit to <code>r</code> or <code>reword</code> (... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 22,957 | git | # Git rebase process gets stuck with detached head
I'm trying on a certain project to reword the penultimate commit to fix a typo by running `git rebase -i HEAD~3`, (using the "nano" editor) then changing the default `pick` option of that commit to `r` or `reword` (on the initial rebase file window), and, without modi... | The detached HEAD message appears normally when you put `edit` in the to-do file for the interactive rebase. You must have mistakenly put `edit` there instead of `reword`. Or Git might have entered this mode (which is also entered in conflicts) due to the error found in your output:
> This repository is configured for... |
46175462 | VS Code Git push is not pushing the code to remote | 14 | 2017-09-12 11:40:32 | <p>I cloned a GIT repo in my device and started editing the code using VSCode. Then I made several changes to my code and committed it successfully.</p>
<p>But when I tried to push it from push menu it doesn't seem to be working. It <em>shows</em> that it's <em>syncing</em>, but that goes on forever.</p>
<p>I couldn't ... | 63,668 | 8,576,767 | 2021-07-04 07:50:55 | 46,175,548 | 12 | 2017-09-12 11:45:13 | 4,587,609 | 2020-11-05 09:09:28 | https://stackoverflow.com/q/46175462 | https://stackoverflow.com/a/46175548 | <p>First of all check whether you have already configured GIT on environment variables. If so, simply run below commands on VS Code terminal</p>
<pre><code>$>git --version
</code></pre>
<p>Expected output</p>
<blockquote>
<p>git version 2.28.0.windows.1</p>
</blockquote>
<p>Use the command below to avoid prompt of ... | <p>First of all check whether you have already configured GIT on environment variables. If so, simply run below commands on VS Code terminal</p> <pre><code>$>git --version </code></pre> <p>Expected output</p> <blockquote> <p>git version 2.28.0.windows.1</p> </blockquote> <p>Use the command below to avoid prompt of ... | 119, 111608 | git, visual-studio-code | <h1>VS Code Git push is not pushing the code to remote</h1>
<p>I cloned a GIT repo in my device and started editing the code using VSCode. Then I made several changes to my code and committed it successfully.</p>
<p>But when I tried to push it from push menu it doesn't seem to be working. It <em>shows</em> that it's <e... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 22,958 | git | # VS Code Git push is not pushing the code to remote
I cloned a GIT repo in my device and started editing the code using VSCode. Then I made several changes to my code and committed it successfully.
But when I tried to push it from push menu it doesn't seem to be working. It *shows* that it's *syncing*, but that goes... | First of all check whether you have already configured GIT on environment variables. If so, simply run below commands on VS Code terminal
```
$>git --version
```
Expected output
> git version 2.28.0.windows.1
Use the command below to avoid prompt of git credentials every time and set it at global level
```
$>git c... |
38251859 | Why would git cherry-pick produce fewer conflicts than git rebase? | 14 | 2016-07-07 17:36:09 | <p>I rebase often. Occasionally the <code>rebase</code> is particularly problematic (lots of merge conflicts) and my solution in such cases is to <code>cherry-pick</code> the individual commits onto master branch. I do this because nearly every time I do, the number of conflicts is considerably less.</p>
<p>My questi... | 2,624 | 379,512 | 2016-07-08 02:05:37 | 38,253,199 | 12 | 2016-07-07 18:50:45 | 1,256,452 | 2016-07-08 02:05:37 | https://stackoverflow.com/q/38251859 | https://stackoverflow.com/a/38253199 | <h3>Updated answer (see update in question)</h3>
<p>I think what's happening here has to do with <em>choosing the commits to copy</em>.</p>
<p>Let's note, and then put aside, the fact that <code>git rebase</code> may use either <code>git cherry-pick</code>, or <code>git format-patch</code> and <code>git am</code>, to... | <h3>Updated answer (see update in question)</h3> <p>I think what's happening here has to do with <em>choosing the commits to copy</em>.</p> <p>Let's note, and then put aside, the fact that <code>git rebase</code> may use either <code>git cherry-pick</code>, or <code>git format-patch</code> and <code>git am</code>, to... | 119, 29934, 78810 | git, git-cherry-pick, git-rebase | <h1>Why would git cherry-pick produce fewer conflicts than git rebase?</h1>
<p>I rebase often. Occasionally the <code>rebase</code> is particularly problematic (lots of merge conflicts) and my solution in such cases is to <code>cherry-pick</code> the individual commits onto master branch. I do this because nearly ever... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 22,959 | git | # Why would git cherry-pick produce fewer conflicts than git rebase?
I rebase often. Occasionally the `rebase` is particularly problematic (lots of merge conflicts) and my solution in such cases is to `cherry-pick` the individual commits onto master branch. I do this because nearly every time I do, the number of confl... | ### Updated answer (see update in question)
I think what's happening here has to do with *choosing the commits to copy*.
Let's note, and then put aside, the fact that `git rebase` may use either `git cherry-pick`, or `git format-patch` and `git am`, to copy some commits. In most cases `git cherry-pick` and `git am` s... |
36405141 | How does version control with LabVIEW VIs work? | 14 | 2016-04-04 14:15:04 | <p>Does anybody have experience with version control and LabVIEW? Since LabVIEW VIs are not text-based, how does it work? I would like to use git but I have a few questions: </p>
<ul>
<li><p>When committing changes, does git recognize the differences in the VI or does it replace the whole file with the new one? Does t... | 11,266 | 6,050,032 | 2018-05-17 22:22:32 | 36,410,100 | 12 | 2016-04-04 18:25:32 | 616,838 | 2016-04-04 18:25:32 | https://stackoverflow.com/q/36405141 | https://stackoverflow.com/a/36410100 | <blockquote>
<p>When committing changes, does git recognize the differences in the VI or does it replace the whole file with the new one? Does this result in a large expansion of the repository?</p>
</blockquote>
<p>VIs are binary files, and so <code>git</code> will save the updated version as a new object. This can... | <blockquote> <p>When committing changes, does git recognize the differences in the VI or does it replace the whole file with the new one? Does this result in a large expansion of the repository?</p> </blockquote> <p>VIs are binary files, and so <code>git</code> will save the updated version as a new object. This can... | 119, 456, 1665 | git, labview, version-control | <h1>How does version control with LabVIEW VIs work?</h1>
<p>Does anybody have experience with version control and LabVIEW? Since LabVIEW VIs are not text-based, how does it work? I would like to use git but I have a few questions: </p>
<ul>
<li><p>When committing changes, does git recognize the differences in the VI o... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 22,960 | git | # How does version control with LabVIEW VIs work?
Does anybody have experience with version control and LabVIEW? Since LabVIEW VIs are not text-based, how does it work? I would like to use git but I have a few questions:
- When committing changes, does git recognize the differences in the VI or does it replace the wh... | > When committing changes, does git recognize the differences in the VI or does it replace the whole file with the new one? Does this result in a large expansion of the repository?
VIs are binary files, and so `git` will save the updated version as a new object. This can cause a LabVIEW repository to grow faster than ... |
22316165 | git merge Already up to date when it is not | 14 | 2014-03-11 03:57:05 | <p>While working on a project using git and bitbucket.com, there are the following branches:</p>
<pre><code>master
development
uat
production
</code></pre>
<p>When I started the project work I took a git clone of development (thinking naturally that it contained the state of the art code). Months of work later, and n... | 22,841 | 3,170,937 | 2014-03-11 06:42:52 | 22,318,296 | 12 | 2014-03-11 06:42:52 | 1,256,452 | 2014-03-11 06:42:52 | https://stackoverflow.com/q/22316165 | https://stackoverflow.com/a/22318296 | <p>You may not want to <code>merge</code>, but rather to <code>rebase</code>. That is, take the commits you've made, the commits <em>you</em> added to branch <code>development</code>βthe ones that were not there when you first did your <code>clone</code>, but are there nowβand see what changes each one made in sequenc... | <p>You may not want to <code>merge</code>, but rather to <code>rebase</code>. That is, take the commits you've made, the commits <em>you</em> added to branch <code>development</code>βthe ones that were not there when you first did your <code>clone</code>, but are there nowβand see what changes each one made in sequenc... | 119, 717, 28897 | git, git-merge, merge | <h1>git merge Already up to date when it is not</h1>
<p>While working on a project using git and bitbucket.com, there are the following branches:</p>
<pre><code>master
development
uat
production
</code></pre>
<p>When I started the project work I took a git clone of development (thinking naturally that it contained th... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 22,962 | git | # git merge Already up to date when it is not
While working on a project using git and bitbucket.com, there are the following branches:
```
master
development
uat
production
```
When I started the project work I took a git clone of development (thinking naturally that it contained the state of the art code). Months ... | You may not want to `merge`, but rather to `rebase`. That is, take the commits you've made, the commits *you* added to branch `development`βthe ones that were not there when you first did your `clone`, but are there nowβand see what changes each one made in sequence; and apply those changes, again in sequence, on top o... |
16518129 | How to deploy my bitbucket code easily to my production server | 14 | 2013-05-13 08:53:18 | <p>I got a private git repo on Bitbucket, i update it from my local repo. It works just fine.
But now my project is about to be done and i need to find a solution to deploy my code to the production server.</p>
<p>I look for a easy and fast solution but i did not find anything for bitbucket, all solution seems to be d... | 25,208 | 1,112,901 | 2013-09-26 17:42:06 | 16,548,214 | 12 | 2013-05-14 16:23:32 | 1,112,901 | 2013-05-14 16:23:32 | https://stackoverflow.com/q/16518129 | https://stackoverflow.com/a/16548214 | <p>I finally use choose <a href="https://github.com/scttnlsn/dandelion" rel="noreferrer">Dandelion</a>.</p>
<p>It's really easy to install : <code>gem install dandelion</code> and easy to use, you just have to edit dandelion.yml put your connection info there and then <code>dandelion deploy</code>!</p>
<p>Works fine... | <p>I finally use choose <a href="https://github.com/scttnlsn/dandelion" rel="noreferrer">Dandelion</a>.</p> <p>It's really easy to install : <code>gem install dandelion</code> and easy to use, you just have to edit dandelion.yml put your connection info there and then <code>dandelion deploy</code>!</p> <p>Works fine... | 119, 8337 | bitbucket, git | <h1>How to deploy my bitbucket code easily to my production server</h1>
<p>I got a private git repo on Bitbucket, i update it from my local repo. It works just fine.
But now my project is about to be done and i need to find a solution to deploy my code to the production server.</p>
<p>I look for a easy and fast soluti... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 22,963 | git | # How to deploy my bitbucket code easily to my production server
I got a private git repo on Bitbucket, i update it from my local repo. It works just fine.
But now my project is about to be done and i need to find a solution to deploy my code to the production server.
I look for a easy and fast solution but i did not... | I finally use choose [Dandelion](https://github.com/scttnlsn/dandelion).
It's really easy to install : `gem install dandelion` and easy to use, you just have to edit dandelion.yml put your connection info there and then `dandelion deploy`!
Works fine, fully integrated with git and service agnostic :) |
8494783 | Ignoring .gitignore config/database.yml in a rails project | 14 | 2011-12-13 19:10:31 | <p>When working on rails project (I'm still in the "beginner" phase of learning at the moment by the way) the file config/database.yml seems to be the one where things like database passwords etc. go. However, nobody seems to recommend putting it in the .gitignore file - why? </p>
<p>Surely I would need to exclude thi... | 15,428 | 705,589 | 2017-07-21 10:48:50 | 8,494,885 | 12 | 2011-12-13 19:19:27 | 736,560 | 2014-02-18 10:27:36 | https://stackoverflow.com/q/8494783 | https://stackoverflow.com/a/8494885 | <p><code>database.yml</code> is the proper place for configuring your database credentials. Normally you'd commit <code>database.yml</code> while only configured with your development and testing environments. </p>
<p>I don't have passwords on my local Postgres and MySQL instances so I can safely commit <code>database... | <p><code>database.yml</code> is the proper place for configuring your database credentials. Normally you'd commit <code>database.yml</code> while only configured with your development and testing environments. </p> <p>I don't have passwords on my local Postgres and MySQL instances so I can safely commit <code>database... | 119, 725, 4984 | configuration, git, ruby-on-rails | <h1>Ignoring .gitignore config/database.yml in a rails project</h1>
<p>When working on rails project (I'm still in the "beginner" phase of learning at the moment by the way) the file config/database.yml seems to be the one where things like database passwords etc. go. However, nobody seems to recommend putting it in th... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 22,966 | git | # Ignoring .gitignore config/database.yml in a rails project
When working on rails project (I'm still in the "beginner" phase of learning at the moment by the way) the file config/database.yml seems to be the one where things like database passwords etc. go. However, nobody seems to recommend putting it in the .gitign... | `database.yml` is the proper place for configuring your database credentials. Normally you'd commit `database.yml` while only configured with your development and testing environments.
I don't have passwords on my local Postgres and MySQL instances so I can safely commit `database.yml`. If you want to ignore it, just ... |
4468234 | Git "Fetch URL" and "Push URL", whats the difference? | 14 | 2010-12-17 06:19:41 | <p>When would the Fetch URL and Push URL not be the same for a certain remote?</p>
<p>For example, when i run <code>git remote show central</code> for a remote named central, the output looks like:</p>
<pre><code>* remote central
Fetch URL: aoberoi@example.com:/home/aoberoi/Repositories/example.git
Push URL: aob... | 11,059 | 305,340 | 2019-08-28 15:35:43 | 4,468,325 | 12 | 2010-12-17 06:42:04 | 6,309 | 2017-01-20 22:13:31 | https://stackoverflow.com/q/4468234 | https://stackoverflow.com/a/4468325 | <p>I am not sure what you mean, since your example includes 2 <em>identical</em> URL, but URLS for push and pull can differ because of:</p>
<ul>
<li><strong>protocol issue</strong>: see <a href="https://git-scm.com/book/ch4-1.html" rel="nofollow noreferrer">Git protocols</a>: the url will be <em>slightly</em> differen... | <p>I am not sure what you mean, since your example includes 2 <em>identical</em> URL, but URLS for push and pull can differ because of:</p> <ul> <li><strong>protocol issue</strong>: see <a href="https://git-scm.com/book/ch4-1.html" rel="nofollow noreferrer">Git protocols</a>: the url will be <em>slightly</em> differen... | 119, 758, 4236, 33720 | git, git-fetch, push, workflow | <h1>Git "Fetch URL" and "Push URL", whats the difference?</h1>
<p>When would the Fetch URL and Push URL not be the same for a certain remote?</p>
<p>For example, when i run <code>git remote show central</code> for a remote named central, the output looks like:</p>
<pre><code>* remote central
Fetch URL: aoberoi@exam... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 22,967 | git | # Git "Fetch URL" and "Push URL", whats the difference?
When would the Fetch URL and Push URL not be the same for a certain remote?
For example, when i run `git remote show central` for a remote named central, the output looks like:
```
* remote central
Fetch URL: aoberoi@example.com:/home/aoberoi/Repositories/exa... | I am not sure what you mean, since your example includes 2 *identical* URL, but URLS for push and pull can differ because of:
- **protocol issue**: see [Git protocols](https://git-scm.com/book/ch4-1.html): the url will be *slightly* different because not every protocol supports push operations (http for instance, exce... |
62423920 | How to use git sparse-checkout in 2.27+ | 13 | 2020-06-17 07:45:08 | <p>I was trying to reproduce the few tutorial steps from:</p>
<p><a href="https://github.blog/2020-01-17-bring-your-monorepo-down-to-size-with-sparse-checkout" rel="noreferrer">https://github.blog/2020-01-17-bring-your-monorepo-down-to-size-with-sparse-checkout</a></p>
<p>Which was made for git 2.25, but now in 2.27,... | 10,679 | 9,729,724 | 2024-01-14 18:47:40 | 62,480,045 | 12 | 2020-06-19 23:51:55 | 56,541 | 2020-06-19 23:51:55 | https://stackoverflow.com/q/62423920 | https://stackoverflow.com/a/62480045 | <p>I believe I found the reason for this. Commit <a href="https://github.com/git/git/commit/f56f31af0301f6446f8689ba1a997d74fb82f45f" rel="noreferrer"><code>f56f31af0301</code></a> to Git changed the implementation of <code>sparse-checkout</code> so that, when you have an uninitialized working tree (as you would right ... | <p>I believe I found the reason for this. Commit <a href="https://github.com/git/git/commit/f56f31af0301f6446f8689ba1a997d74fb82f45f" rel="noreferrer"><code>f56f31af0301</code></a> to Git changed the implementation of <code>sparse-checkout</code> so that, when you have an uninitialized working tree (as you would right ... | 119 | git | <h1>How to use git sparse-checkout in 2.27+</h1>
<p>I was trying to reproduce the few tutorial steps from:</p>
<p><a href="https://github.blog/2020-01-17-bring-your-monorepo-down-to-size-with-sparse-checkout" rel="noreferrer">https://github.blog/2020-01-17-bring-your-monorepo-down-to-size-with-sparse-checkout</a></p>
... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 22,969 | git | # How to use git sparse-checkout in 2.27+
I was trying to reproduce the few tutorial steps from:
<https://github.blog/2020-01-17-bring-your-monorepo-down-to-size-with-sparse-checkout>
Which was made for git 2.25, but now in 2.27, nothing happen at all when running:
```
$ git sparse-checkout set client/android
```
... | I believe I found the reason for this. Commit [`f56f31af0301`](https://github.com/git/git/commit/f56f31af0301f6446f8689ba1a997d74fb82f45f) to Git changed the implementation of `sparse-checkout` so that, when you have an uninitialized working tree (as you would right after running `git clone --no-checkout`), running `gi... |
59315574 | git filter-repo: can it be used on a specific branch? | 13 | 2019-12-13 03:02:13 | <p>I'm reading about what <code>git filter-repo</code> can do because I want to do a small experiment with it.... I have this repo where I only want to get the history of one directory from, say.... master..... but I don't want to work on master. I would like to create a new branch, say <code>filter-repo-test</code> an... | 11,260 | 2,437,508 | 2023-01-06 22:28:54 | 59,316,302 | 12 | 2019-12-13 04:50:26 | 6,309 | 2023-01-06 22:28:54 | https://stackoverflow.com/q/59315574 | https://stackoverflow.com/a/59316302 | <p>The <a href="https://refined-github-html-preview.kidonng.workers.dev/newren/git-filter-repo/raw/docs/html/git-filter-repo.html#_miscellaneous_options" rel="nofollow noreferrer">'Miscellaneous Options</a>' includes <code>--refs</code></p>
<p>--refs <refs+></p>
<blockquote>
<p>Limit history rewriting to the spec... | <p>The <a href="https://refined-github-html-preview.kidonng.workers.dev/newren/git-filter-repo/raw/docs/html/git-filter-repo.html#_miscellaneous_options" rel="nofollow noreferrer">'Miscellaneous Options</a>' includes <code>--refs</code></p> <p>--refs <refs+></p> <blockquote> <p>Limit history rewriting to the spec... | 119, 141715 | git, git-filter-repo | <h1>git filter-repo: can it be used on a specific branch?</h1>
<p>I'm reading about what <code>git filter-repo</code> can do because I want to do a small experiment with it.... I have this repo where I only want to get the history of one directory from, say.... master..... but I don't want to work on master. I would li... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 22,970 | git | # git filter-repo: can it be used on a specific branch?
I'm reading about what `git filter-repo` can do because I want to do a small experiment with it.... I have this repo where I only want to get the history of one directory from, say.... master..... but I don't want to work on master. I would like to create a new b... | The ['Miscellaneous Options](https://refined-github-html-preview.kidonng.workers.dev/newren/git-filter-repo/raw/docs/html/git-filter-repo.html#_miscellaneous_options)' includes `--refs`
--refs <refs+>
> Limit history rewriting to the specified refs. Implies `--partial`.
> In addition to the normal caveats of `--par... |
30197694 | How can I rebase as one commit using Git | 13 | 2015-05-12 17:28:20 | <p>My history looks somewhat like this but times 10:</p>
<pre><code> i - j - e'- k - h'- l - m feature-branch
/
a - b - c - d - e - f - g - h master
</code></pre>
<p>(the apostrophes meaning cherry picks)
I want to rebase to this:</p>
<pre><code> i... | 8,118 | 3,465,211 | 2015-05-12 18:58:04 | 30,198,535 | 12 | 2015-05-12 18:16:02 | 82,294 | 2015-05-12 18:29:39 | https://stackoverflow.com/q/30197694 | https://stackoverflow.com/a/30198535 | <p>This is actually quite easy.</p>
<ol>
<li><p>Merge <code>master</code> into <code>feature-branch</code>. You will solve all of your merge conflicts here at once. (I <strong>highly recommend</strong> stopping here.)</p>
<pre><code> i - j - e'- k - h'- l - m - n feature-branch
/ ... | <p>This is actually quite easy.</p> <ol> <li><p>Merge <code>master</code> into <code>feature-branch</code>. You will solve all of your merge conflicts here at once. (I <strong>highly recommend</strong> stopping here.)</p> <pre><code> i - j - e'- k - h'- l - m - n feature-branch / ... | 119, 8974, 42532 | git, rebase, squash | <h1>How can I rebase as one commit using Git</h1>
<p>My history looks somewhat like this but times 10:</p>
<pre><code> i - j - e'- k - h'- l - m feature-branch
/
a - b - c - d - e - f - g - h master
</code></pre>
<p>(the apostrophes meaning cherry picks)
I want to rebase to this:</... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 22,976 | git | # How can I rebase as one commit using Git
My history looks somewhat like this but times 10:
```
i - j - e'- k - h'- l - m feature-branch
/
a - b - c - d - e - f - g - h master
```
(the apostrophes meaning cherry picks)
I want to rebase to this:
```
... | This is actually quite easy.
1. Merge `master` into `feature-branch`. You will solve all of your merge conflicts here at once. (I **highly recommend** stopping here.)
```
i - j - e'- k - h'- l - m - n feature-branch
/ /
a - b - c - d - e - f - g - h -----... |
28355697 | git rev-parse --verify says "fatal: Needed a single revision" | 13 | 2015-02-05 23:01:38 | <p>Consider this test script.</p>
<pre><code>#!/bin/sh -x
rm -rf origin clone
git init origin
cd origin
echo foo > file
git add -A
git commit -m "initial commit"
git branch foo
cd ..
git clone origin clone
cd clone
git rev-parse --verify foo
</code></pre>
<p>We create an <code>origin</code> repo, create a branch... | 13,715 | 54,829 | 2015-02-05 23:25:28 | 28,355,988 | 12 | 2015-02-05 23:25:28 | 1,256,452 | 2015-02-05 23:25:28 | https://stackoverflow.com/q/28355697 | https://stackoverflow.com/a/28355988 | <p>You are correct: branch <code>foo</code> does not exist in the clone.</p>
<p>The clone process normally copies all the branchesβmore precisely, references of the form <code>refs/heads/*</code>βto remote-tracking branches, references of the form <code>refs/remotes/<remote>/*</code>. (The name of the remote is... | <p>You are correct: branch <code>foo</code> does not exist in the clone.</p> <p>The clone process normally copies all the branchesβmore precisely, references of the form <code>refs/heads/*</code>βto remote-tracking branches, references of the form <code>refs/remotes/<remote>/*</code>. (The name of the remote is... | 119 | git | <h1>git rev-parse --verify says "fatal: Needed a single revision"</h1>
<p>Consider this test script.</p>
<pre><code>#!/bin/sh -x
rm -rf origin clone
git init origin
cd origin
echo foo > file
git add -A
git commit -m "initial commit"
git branch foo
cd ..
git clone origin clone
cd clone
git rev-parse --verify foo
<... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 22,977 | git | # git rev-parse --verify says "fatal: Needed a single revision"
Consider this test script.
```
#!/bin/sh -x
rm -rf origin clone
git init origin
cd origin
echo foo > file
git add -A
git commit -m "initial commit"
git branch foo
cd ..
git clone origin clone
cd clone
git rev-parse --verify foo
```
We create an `origi... | You are correct: branch `foo` does not exist in the clone.
The clone process normally copies all the branchesβmore precisely, references of the form `refs/heads/*`βto remote-tracking branches, references of the form `refs/remotes/<remote>/*`. (The name of the remote is whatever you specify with `-o`, or `origin` if yo... |
27578521 | git: remove dead branch after a rebase? | 13 | 2014-12-20 08:37:27 | <p>I have the following git branches: master and dev:</p>
<pre><code> *master*
|
A--B--C
\--D--E
|
*dev*
</code></pre>
<p>After rebasing dev on master, I have:</p>
<pre><code> *master*
|
A--B--C--D'--E'
\--D--E |
|
*dev*
</code></pre>
<p>So D and E rem... | 11,162 | 1,467,494 | 2014-12-20 09:06:51 | 27,578,565 | 12 | 2014-12-20 08:46:52 | 1,256,452 | 2014-12-20 08:46:52 | https://stackoverflow.com/q/27578521 | https://stackoverflow.com/a/27578565 | <p>You don't need to: because commits <code>D</code> and <code>E</code> have no<sup>1</sup> name pointing to them, they're eligible for "garbage collection". Eventually git will run a <code>git gc</code> and throw them away for you.</p>
<p>If you want to speed this up, you can run <code>git gc</code> yourself, but th... | <p>You don't need to: because commits <code>D</code> and <code>E</code> have no<sup>1</sup> name pointing to them, they're eligible for "garbage collection". Eventually git will run a <code>git gc</code> and throw them away for you.</p> <p>If you want to speed this up, you can run <code>git gc</code> yourself, but th... | 119, 8974 | git, rebase | <h1>git: remove dead branch after a rebase?</h1>
<p>I have the following git branches: master and dev:</p>
<pre><code> *master*
|
A--B--C
\--D--E
|
*dev*
</code></pre>
<p>After rebasing dev on master, I have:</p>
<pre><code> *master*
|
A--B--C--D'--E'
\--D--E |
|
... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 22,978 | git | # git: remove dead branch after a rebase?
I have the following git branches: master and dev:
```
*master*
|
A--B--C
\--D--E
|
*dev*
```
After rebasing dev on master, I have:
```
*master*
|
A--B--C--D'--E'
\--D--E |
|
*dev*
```
So D and E remain in a... | You don't need to: because commits `D` and `E` have no1 name pointing to them, they're eligible for "garbage collection". Eventually git will run a `git gc` and throw them away for you.
If you want to speed this up, you can run `git gc` yourself, but then footnote 1 comes into play. :-)
---
1This is not quite true. ... |
4965175 | Make subprocess find git executable on Windows | 13 | 2011-02-11 02:51:11 | <pre><code>import subprocess
proc = subprocess.Popen('git status')
print 'result: ', proc.communicate()
</code></pre>
<p>I have git in my system path, but when I run subprocess like this I get:<br>
<code>WindowsError: [Error 2] The system cannot find the file specified</code></p>
<p>How can I get subprocess to find ... | 8,313 | 88,696 | 2020-06-21 00:15:49 | 10,555,130 | 12 | 2012-05-11 16:22:07 | 265,261 | 2015-02-17 18:58:40 | https://stackoverflow.com/q/4965175 | https://stackoverflow.com/a/10555130 | <p>The problem you see here is that the Windows API function <a href="http://msdn.microsoft.com/en-us/library/windows/desktop/ms682425(v=vs.85).aspx" rel="noreferrer">CreateProcess</a>, used by subprocess under the hood, doesn't auto-resolve other executable extensions than <code>.exe</code>. On Windows, the 'git' comm... | <p>The problem you see here is that the Windows API function <a href="http://msdn.microsoft.com/en-us/library/windows/desktop/ms682425(v=vs.85).aspx" rel="noreferrer">CreateProcess</a>, used by subprocess under the hood, doesn't auto-resolve other executable extensions than <code>.exe</code>. On Windows, the 'git' comm... | 16, 64, 119, 2348, 6268 | git, path, python, subprocess, windows | <h1>Make subprocess find git executable on Windows</h1>
<pre><code>import subprocess
proc = subprocess.Popen('git status')
print 'result: ', proc.communicate()
</code></pre>
<p>I have git in my system path, but when I run subprocess like this I get:<br>
<code>WindowsError: [Error 2] The system cannot find the file sp... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 22,980 | git | # Make subprocess find git executable on Windows
```
import subprocess
proc = subprocess.Popen('git status')
print 'result: ', proc.communicate()
```
I have git in my system path, but when I run subprocess like this I get:
`WindowsError: [Error 2] The system cannot find the file specified`
How can I get subproces... | The problem you see here is that the Windows API function [CreateProcess](http://msdn.microsoft.com/en-us/library/windows/desktop/ms682425(v=vs.85).aspx), used by subprocess under the hood, doesn't auto-resolve other executable extensions than `.exe`. On Windows, the 'git' command is really installed as `git.cmd`. Ther... |
8483041 | Git - Color words excluding {} | 13 | 2011-12-13 00:52:20 | <p>I am using git with --color-words to view my diff. In my diff, it shows that I removed </p>
<pre><code><b>{{ljcount}}</b>&nbsp;&nbsp;&nbsp;Changes
</code></pre>
<p>And that I added:</p>
<pre><code><b>{{skills_limits}}</b>&nbsp;&nbsp;&nbsp;Changes
</code></pre>
<p>T... | 2,844 | 165,495 | 2021-05-16 19:19:33 | 8,483,211 | 12 | 2011-12-13 01:18:12 | 269,483 | 2011-12-13 05:36:18 | https://stackoverflow.com/q/8483041 | https://stackoverflow.com/a/8483211 | <p>From <code>git help diff</code>:</p>
<pre><code> --word-diff-regex=<regex>
Use <regex> to decide what a word is, instead of considering runs of non-whitespace to be a word. Also implies
--word-diff unless it was already enabled.
</code></pre>
<p>The following expression will make a word... | <p>From <code>git help diff</code>:</p> <pre><code> --word-diff-regex=<regex> Use <regex> to decide what a word is, instead of considering runs of non-whitespace to be a word. Also implies --word-diff unless it was already enabled. </code></pre> <p>The following expression will make a word... | 18, 119 | git, regex | <h1>Git - Color words excluding {}</h1>
<p>I am using git with --color-words to view my diff. In my diff, it shows that I removed </p>
<pre><code><b>{{ljcount}}</b>&nbsp;&nbsp;&nbsp;Changes
</code></pre>
<p>And that I added:</p>
<pre><code><b>{{skills_limits}}</b>&nbsp;&nb... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 22,981 | git | # Git - Color words excluding {}
I am using git with --color-words to view my diff. In my diff, it shows that I removed
```
<b>{{ljcount}}</b> Changes
```
And that I added:
```
<b>{{skills_limits}}</b> Changes
```
This is larger than what I would like it to be (I want the word bou... | From `git help diff`:
```
--word-diff-regex=<regex>
Use <regex> to decide what a word is, instead of considering runs of non-whitespace to be a word. Also implies
--word-diff unless it was already enabled.
```
The following expression will make a word be any string of characters and underscore, or an... |
5871652 | Running a βsecureβ git server over SSH without gitosis/gitolite? | 13 | 2011-05-03 15:11:24 | <p>Is it possible to run a git server over ssh, using <code>authorized_keys</code> and <code>command=</code> to restrict access to only the git repositories, without using gitosis/gitolite?</p>
| 5,434 | 71,522 | 2013-04-13 00:59:46 | 5,871,724 | 12 | 2011-05-03 15:16:30 | 134,841 | 2011-05-03 15:16:30 | https://stackoverflow.com/q/5871652 | https://stackoverflow.com/a/5871724 | <p>Yes, assign the <a href="http://www.kernel.org/pub/software/scm/git/docs/git-shell.html"><code>git shell</code></a> as the login shell for all users which shall only have git access.</p>
| <p>Yes, assign the <a href="http://www.kernel.org/pub/software/scm/git/docs/git-shell.html"><code>git shell</code></a> as the login shell for all users which shall only have git access.</p> | 119, 386 | git, ssh | <h1>Running a βsecureβ git server over SSH without gitosis/gitolite?</h1>
<p>Is it possible to run a git server over ssh, using <code>authorized_keys</code> and <code>command=</code> to restrict access to only the git repositories, without using gitosis/gitolite?</p>
| q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 22,982 | git | # Running a βsecureβ git server over SSH without gitosis/gitolite?
Is it possible to run a git server over ssh, using `authorized_keys` and `command=` to restrict access to only the git repositories, without using gitosis/gitolite? | Yes, assign the [`git shell`](http://www.kernel.org/pub/software/scm/git/docs/git-shell.html) as the login shell for all users which shall only have git access. |
5097078 | GIT support for branch based user authorization - Best Practices or Tools? | 13 | 2011-02-23 21:03:40 | <p>For a product based GIT repository, wherein there are branches for maintenance, testing as well as future development, how do I control user access to these branches. By access, I mean that even though others may read from it, they should not be able to inadvertently push changes to the repo.</p>
<p>For example,</p... | 11,952 | 631,096 | 2015-09-03 19:40:48 | 5,097,437 | 12 | 2011-02-23 21:32:03 | 6,309 | 2015-09-03 19:40:48 | https://stackoverflow.com/q/5097078 | https://stackoverflow.com/a/5097437 | <p>The other classic way to restrict push access to a repo (or a branch or even a directory) is by using <strong><a href="https://github.com/sitaramc/gitolite" rel="nofollow noreferrer"><code>gitolite</code></a></strong> (which actually is a <em>big</em> evolution of <code>gitosis</code>). </p>
<p>You can define ther... | <p>The other classic way to restrict push access to a repo (or a branch or even a directory) is by using <strong><a href="https://github.com/sitaramc/gitolite" rel="nofollow noreferrer"><code>gitolite</code></a></strong> (which actually is a <em>big</em> evolution of <code>gitosis</code>). </p> <p>You can define ther... | 119, 136, 11750, 76220 | code-access-security, git, git-branch, security | <h1>GIT support for branch based user authorization - Best Practices or Tools?</h1>
<p>For a product based GIT repository, wherein there are branches for maintenance, testing as well as future development, how do I control user access to these branches. By access, I mean that even though others may read from it, they s... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 22,983 | git | # GIT support for branch based user authorization - Best Practices or Tools?
For a product based GIT repository, wherein there are branches for maintenance, testing as well as future development, how do I control user access to these branches. By access, I mean that even though others may read from it, they should not... | The other classic way to restrict push access to a repo (or a branch or even a directory) is by using **[`gitolite`](https://github.com/sitaramc/gitolite)** (which actually is a *big* evolution of `gitosis`).
You can define there (in the `gitolite` config file) any group of users or group of repos you need and associa... |
953658 | How do you handle deploying rails applications with submodules? | 13 | 2009-06-04 23:47:40 | <p>I recently turned a couple of my plugins into submodules and realized that when you "git clone" a repository, the submodule directory will be empty. This makes sense for co-developers to initialize their submodules and update. </p>
<p>However, when I deploy with capistrano the submodule code will obviously not be... | 3,387 | 45,849 | 2013-01-18 00:40:35 | 954,213 | 12 | 2009-06-05 03:55:00 | 6,309 | 2013-01-18 00:40:35 | https://stackoverflow.com/q/953658 | https://stackoverflow.com/a/954213 | <p>According to <a href="http://railsforum.com/viewtopic.php?id=30122" rel="nofollow noreferrer">this recent thread</a>, capistrano should be able to init and update your submodules:</p>
<pre><code>set :git_enable_submodules,1
</code></pre>
<p>in config/deploy.rb should be enough, if your <code>.gitmodules</code> ent... | <p>According to <a href="http://railsforum.com/viewtopic.php?id=30122" rel="nofollow noreferrer">this recent thread</a>, capistrano should be able to init and update your submodules:</p> <pre><code>set :git_enable_submodules,1 </code></pre> <p>in config/deploy.rb should be enough, if your <code>.gitmodules</code> ent... | 119, 190, 965, 2831, 41612 | capistrano, deployment, git, git-submodules, plugins | <h1>How do you handle deploying rails applications with submodules?</h1>
<p>I recently turned a couple of my plugins into submodules and realized that when you "git clone" a repository, the submodule directory will be empty. This makes sense for co-developers to initialize their submodules and update. </p>
<p>Howeve... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 22,984 | git | # How do you handle deploying rails applications with submodules?
I recently turned a couple of my plugins into submodules and realized that when you "git clone" a repository, the submodule directory will be empty. This makes sense for co-developers to initialize their submodules and update.
However, when I deploy wi... | According to [this recent thread](http://railsforum.com/viewtopic.php?id=30122), capistrano should be able to init and update your submodules:
```
set :git_enable_submodules,1
```
in config/deploy.rb should be enough, if your `.gitmodules` entries are up to date.
You may need [to patch Capistrano (`lib/capistano/re... |
69858120 | How can I get the git log entry without indenting? | 12 | 2021-11-05 19:07:07 | <p>In git I commit</p>
<pre><code>git commit -m 'this
quote> is
quote> my
quote> msg
quote> '
</code></pre>
<p><code>git log</code> shows</p>
<pre><code>commit 3d640cbff57a6da500e40bba9dc20fd145975119 (HEAD -> main)
Author: me <me@me.org>
Date: Fri Nov 5 12:00:22 2021 -0700
this
is
m... | 2,269 | null | 2023-10-06 20:04:42 | 69,858,767 | 12 | 2021-11-05 20:10:44 | 496,405 | 2022-02-21 21:35:34 | https://stackoverflow.com/q/69858120 | https://stackoverflow.com/a/69858767 | <p><code>git log</code> has the <code>--format=format:%B</code> option which will give you the raw commit message without indents.</p>
<p>To get it to look like what you have in your example, it would be</p>
<pre><code>git log --format=format:"commit %H %d%nAuthor: %an <%ae>%nDate: %aD%n%n%B"
</code></p... | <p><code>git log</code> has the <code>--format=format:%B</code> option which will give you the raw commit message without indents.</p> <p>To get it to look like what you have in your example, it would be</p> <pre><code>git log --format=format:"commit %H %d%nAuthor: %an <%ae>%nDate: %aD%n%n%B" </code></p... | 119 | git | <h1>How can I get the git log entry without indenting?</h1>
<p>In git I commit</p>
<pre><code>git commit -m 'this
quote> is
quote> my
quote> msg
quote> '
</code></pre>
<p><code>git log</code> shows</p>
<pre><code>commit 3d640cbff57a6da500e40bba9dc20fd145975119 (HEAD -> main)
Author: me <me@me.org>
... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 22,985 | git | # How can I get the git log entry without indenting?
In git I commit
```
git commit -m 'this
quote> is
quote> my
quote> msg
quote> '
```
`git log` shows
```
commit 3d640cbff57a6da500e40bba9dc20fd145975119 (HEAD -> main)
Author: me <me@me.org>
Date: Fri Nov 5 12:00:22 2021 -0700
this
is
my
msg
```... | `git log` has the `--format=format:%B` option which will give you the raw commit message without indents.
To get it to look like what you have in your example, it would be
```
git log --format=format:"commit %H %d%nAuthor: %an <%ae>%nDate: %aD%n%n%B"
``` |
48367245 | windows: git has old github username, cant change git user | 12 | 2018-01-21 13:22:17 | <p>I have 2 github accounts, old and new. When I checkout a repo on the new, I cant commit it as it says my old github user is not authorised.</p>
<p>Lets say my old github account username is old, and email is <strong>old@old.com</strong>
Lets say my new github account username is new, and email is <strong>new@new.co... | 7,739 | 1,072,187 | 2024-04-24 04:47:10 | 48,771,955 | 12 | 2018-02-13 17:01:09 | 6,309 | 2018-02-13 17:01:09 | https://stackoverflow.com/q/48367245 | https://stackoverflow.com/a/48771955 | <blockquote>
<p>unable to access '<a href="https://github.com/new/test.git/" rel="noreferrer">https://github.com/new/test.git/</a>':</p>
</blockquote>
<p>That means: SSH is not involved. At all.<br>
And user.name / user.email has nothing to do with authentication either.</p>
<p>Since you are using https, Git will u... | <blockquote> <p>unable to access '<a href="https://github.com/new/test.git/" rel="noreferrer">https://github.com/new/test.git/</a>':</p> </blockquote> <p>That means: SSH is not involved. At all.<br> And user.name / user.email has nothing to do with authentication either.</p> <p>Since you are using https, Git will u... | 119 | git | <h1>windows: git has old github username, cant change git user</h1>
<p>I have 2 github accounts, old and new. When I checkout a repo on the new, I cant commit it as it says my old github user is not authorised.</p>
<p>Lets say my old github account username is old, and email is <strong>old@old.com</strong>
Lets say my... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 22,987 | git | # windows: git has old github username, cant change git user
I have 2 github accounts, old and new. When I checkout a repo on the new, I cant commit it as it says my old github user is not authorised.
Lets say my old github account username is old, and email is **old@old.com**
Lets say my new github account username ... | > unable to access '<https://github.com/new/test.git/>':
That means: SSH is not involved. At all.
And user.name / user.email has nothing to do with authentication either.
Since you are using https, Git will use the first cached credential it finds for github.com.
Check the returned value of `git config credential... |
48708239 | Why should we never use rebase with commits that have been pushed | 12 | 2018-02-09 14:40:34 | <p>Im still getting my feet wet with VSTS and Git. I understand the scenario where changes in the master branch need to get into the feature branch, but these "reminders" or tips dont make sense to me yet.
What is meant by the statement below?
<a href="https://learn.microsoft.com/en-us/vsts/git/tutorial/rebase?tabs=vi... | 6,762 | 3,206,983 | 2019-10-15 15:42:24 | 48,710,158 | 12 | 2018-02-09 16:28:51 | 1,256,452 | 2019-10-15 15:42:24 | https://stackoverflow.com/q/48708239 | https://stackoverflow.com/a/48710158 | <p><a href="https://stackoverflow.com/a/48709291/1256452">Ashish Mathew's answer</a>, which links to and quotes from the Pro Git book, is correct, but you may need a lot more background to really <em>understand</em> it. But I'd like to start out by saying that the word "never" is too strong. It's OK to rebase publish... | <p><a href="https://stackoverflow.com/a/48709291/1256452">Ashish Mathew's answer</a>, which links to and quotes from the Pro Git book, is correct, but you may need a lot more background to really <em>understand</em> it. But I'd like to start out by saying that the word "never" is too strong. It's OK to rebase publish... | 119 | git | <h1>Why should we never use rebase with commits that have been pushed</h1>
<p>Im still getting my feet wet with VSTS and Git. I understand the scenario where changes in the master branch need to get into the feature branch, but these "reminders" or tips dont make sense to me yet.
What is meant by the statement below?
... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 22,988 | git | # Why should we never use rebase with commits that have been pushed
Im still getting my feet wet with VSTS and Git. I understand the scenario where changes in the master branch need to get into the feature branch, but these "reminders" or tips dont make sense to me yet.
What is meant by the statement below?
<https://l... | [Ashish Mathew's answer](https://stackoverflow.com/a/48709291/1256452), which links to and quotes from the Pro Git book, is correct, but you may need a lot more background to really *understand* it. But I'd like to start out by saying that the word "never" is too strong. It's OK to rebase published commits under one co... |
42791471 | How your .gitignore for Latex projects looks like? | 12 | 2017-03-14 16:29:11 | <p>I am wondering what files I should exclude from VSC in LaTeX projects</p>
| 17,330 | 7,032,515 | 2023-03-14 15:15:02 | 42,797,777 | 12 | 2017-03-14 22:29:58 | 7,032,515 | 2017-03-14 22:29:58 | https://stackoverflow.com/q/42791471 | https://stackoverflow.com/a/42797777 | <p>I've looked into <code>Kile's</code> (LaTeX editor) preferences and found <code>Automatically clean-up files</code> list. I think that it is surely unnecessary files. The List:</p>
<pre><code>.aux .bit .blg .bbl .lof .log .lot .glo .glx .gxg .gxs .idx .ilg .ind .out .url .svn .toc
</code></pre>
<p>I think it is en... | <p>I've looked into <code>Kile's</code> (LaTeX editor) preferences and found <code>Automatically clean-up files</code> list. I think that it is surely unnecessary files. The List:</p> <pre><code>.aux .bit .blg .bbl .lof .log .lot .glo .glx .gxg .gxs .idx .ilg .ind .out .url .svn .toc </code></pre> <p>I think it is en... | 119, 1704 | git, latex | <h1>How your .gitignore for Latex projects looks like?</h1>
<p>I am wondering what files I should exclude from VSC in LaTeX projects</p>
| q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 22,989 | git | # How your .gitignore for Latex projects looks like?
I am wondering what files I should exclude from VSC in LaTeX projects | I've looked into `Kile's` (LaTeX editor) preferences and found `Automatically clean-up files` list. I think that it is surely unnecessary files. The List:
```
.aux .bit .blg .bbl .lof .log .lot .glo .glx .gxg .gxs .idx .ilg .ind .out .url .svn .toc
```
I think it is enough for `.gitignore`. |
42398324 | Git squash without hundreds of merge conflicts? | 12 | 2017-02-22 17:25:18 | <p>I've been working on a feature branch for several months now. In the middle we merged master into the branch several times. Now, after the branch is done, we realized quite alot of the commits from the feature branch had messy commit messages, and it would be good to squash several of these together. </p>
<p>Ho... | 9,141 | 3,108,164 | 2022-06-30 14:29:43 | 42,405,388 | 12 | 2017-02-23 01:22:57 | 1,256,452 | 2017-02-24 18:38:58 | https://stackoverflow.com/q/42398324 | https://stackoverflow.com/a/42405388 | <h3>TL;DR summary: <code>git rebase -i <commit></code></h3>
<p>Essentially, you need to find the point at which the branch you want to work on "forks off", and rebase using that as the <code><upstream></code> argument to <code>git rebase</code>.</p>
<h1>Explanation</h1>
<p>The easiest way to selectively ... | <h3>TL;DR summary: <code>git rebase -i <commit></code></h3> <p>Essentially, you need to find the point at which the branch you want to work on "forks off", and rebase using that as the <code><upstream></code> argument to <code>git rebase</code>.</p> <h1>Explanation</h1> <p>The easiest way to selectively ... | 119 | git | <h1>Git squash without hundreds of merge conflicts?</h1>
<p>I've been working on a feature branch for several months now. In the middle we merged master into the branch several times. Now, after the branch is done, we realized quite alot of the commits from the feature branch had messy commit messages, and it would b... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 22,990 | git | # Git squash without hundreds of merge conflicts?
I've been working on a feature branch for several months now. In the middle we merged master into the branch several times. Now, after the branch is done, we realized quite alot of the commits from the feature branch had messy commit messages, and it would be good to s... | ### TL;DR summary: `git rebase -i <commit>`
Essentially, you need to find the point at which the branch you want to work on "forks off", and rebase using that as the `<upstream>` argument to `git rebase`.
# Explanation
The easiest way to selectively squash various commits together is to use `git rebase -i` (and then... |
42271061 | MATLAB git by command window | 12 | 2017-02-16 10:21:08 | <p>I use <a href="https://uk.mathworks.com/help/matlab/source-control.html" rel="noreferrer">MATLABs git support</a> in the development of my code, often committing, pushing and all the standard source control stuff.</p>
<p>However, I have only used MATLABs user interface that basically works by right clicking on the ... | 12,277 | 1,485,872 | 2023-10-02 20:12:18 | 42,271,585 | 12 | 2017-02-16 10:43:30 | 3,959,671 | 2017-02-16 10:43:30 | https://stackoverflow.com/q/42271061 | https://stackoverflow.com/a/42271585 | <p>You can use the system command line escape <code>!</code> for git commands within MATLAB. Eg:</p>
<pre><code>!git status
!git commit -am "Commit some stuff from MATLAB CLI"
!git push
</code></pre>
<p>You'll need to have Git installed on your system for this to work.</p>
| <p>You can use the system command line escape <code>!</code> for git commands within MATLAB. Eg:</p> <pre><code>!git status !git commit -am "Commit some stuff from MATLAB CLI" !git push </code></pre> <p>You'll need to have Git installed on your system for this to work.</p> | 119, 854 | git, matlab | <h1>MATLAB git by command window</h1>
<p>I use <a href="https://uk.mathworks.com/help/matlab/source-control.html" rel="noreferrer">MATLABs git support</a> in the development of my code, often committing, pushing and all the standard source control stuff.</p>
<p>However, I have only used MATLABs user interface that bas... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 22,991 | git | # MATLAB git by command window
I use [MATLABs git support](https://uk.mathworks.com/help/matlab/source-control.html) in the development of my code, often committing, pushing and all the standard source control stuff.
However, I have only used MATLABs user interface that basically works by right clicking on the folder... | You can use the system command line escape `!` for git commands within MATLAB. Eg:
```
!git status
!git commit -am "Commit some stuff from MATLAB CLI"
!git push
```
You'll need to have Git installed on your system for this to work. |
40195898 | git clone GnuTLS recv error (-9): A TLS packet with unexpected length was received | 12 | 2016-10-22 18:59:57 | <p>I tried to clone my project on my linux server via git and suddenly got this error: </p>
<blockquote>
<p>GnuTLS recv error (-9): A TLS packet with unexpected length was
received.</p>
</blockquote>
<p>This is asked many times, but answered none.</p>
<p>I am using bitbucket.</p>
| 22,666 | 5,911,206 | 2019-01-24 19:18:04 | 40,195,947 | 12 | 2016-10-22 19:04:25 | 5,911,206 | 2019-01-24 19:18:04 | https://stackoverflow.com/q/40195898 | https://stackoverflow.com/a/40195947 | <p>It turns out you just need to remove git with <code>sudo apt-get purge git</code> but NOT with <code>sudo apt-get --purge git</code> for some reason it wont work if you do <code>--purge</code>. Now install it again by typing <code>sudo apt-get install git</code>. And then when you try your clone, it should work prop... | <p>It turns out you just need to remove git with <code>sudo apt-get purge git</code> but NOT with <code>sudo apt-get --purge git</code> for some reason it wont work if you do <code>--purge</code>. Now install it again by typing <code>sudo apt-get install git</code>. And then when you try your clone, it should work prop... | 58, 119, 8337 | bitbucket, git, linux | <h1>git clone GnuTLS recv error (-9): A TLS packet with unexpected length was received</h1>
<p>I tried to clone my project on my linux server via git and suddenly got this error: </p>
<blockquote>
<p>GnuTLS recv error (-9): A TLS packet with unexpected length was
received.</p>
</blockquote>
<p>This is asked many ... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 22,992 | git | # git clone GnuTLS recv error (-9): A TLS packet with unexpected length was received
I tried to clone my project on my linux server via git and suddenly got this error:
> GnuTLS recv error (-9): A TLS packet with unexpected length was
> received.
This is asked many times, but answered none.
I am using bitbucket. | It turns out you just need to remove git with `sudo apt-get purge git` but NOT with `sudo apt-get --purge git` for some reason it wont work if you do `--purge`. Now install it again by typing `sudo apt-get install git`. And then when you try your clone, it should work properly. |
35786548 | git svn clone fails with "Failed to strip path" | 12 | 2016-03-04 01:48:21 | <p>I am using git in a shop that is all Subversion. When I check out a repo using</p>
<p><code>git svn clone -s --preserve-empty-dirs https://<subversion-server>/svn/<repo> <folder-name></code></p>
<p>All seems well as the cloning process begins, but at some point during the process, git fails with... | 1,728 | 1,541,330 | 2024-08-06 12:22:07 | 35,786,619 | 12 | 2016-03-04 01:53:43 | 1,541,330 | 2024-08-06 12:22:07 | https://stackoverflow.com/q/35786548 | https://stackoverflow.com/a/35786619 | <p>Searching the interwebs turned up both <a href="https://web.archive.org/web/20220313041759/https://www.semitwist.com/articles/article/view/the-better-svn-git-guide" rel="nofollow noreferrer">an explanation and advice on how to fix this</a> (see step 4).</p>
<p>Note:</p>
<blockquote>
<p>From v1.7.7 onward, Git has a ... | <p>Searching the interwebs turned up both <a href="https://web.archive.org/web/20220313041759/https://www.semitwist.com/articles/article/view/the-better-svn-git-guide" rel="nofollow noreferrer">an explanation and advice on how to fix this</a> (see step 4).</p> <p>Note:</p> <blockquote> <p>From v1.7.7 onward, Git has a ... | 119, 6452 | git, git-svn | <h1>git svn clone fails with "Failed to strip path"</h1>
<p>I am using git in a shop that is all Subversion. When I check out a repo using</p>
<p><code>git svn clone -s --preserve-empty-dirs https://<subversion-server>/svn/<repo> <folder-name></code></p>
<p>All seems well as the cloning process beg... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 22,994 | git | # git svn clone fails with "Failed to strip path"
I am using git in a shop that is all Subversion. When I check out a repo using
`git svn clone -s --preserve-empty-dirs https://<subversion-server>/svn/<repo> <folder-name>`
All seems well as the cloning process begins, but at some point during the process, git fails ... | Searching the interwebs turned up both [an explanation and advice on how to fix this](https://web.archive.org/web/20220313041759/https://www.semitwist.com/articles/article/view/the-better-svn-git-guide) (see step 4).
Note:
> From v1.7.7 onward, Git has a `--preserve-empty-dirs`. Problem is, the damn thing's broken. I... |
34019170 | What to put into ~/.gitconfig to imply --show-signature for every git subcommand that supports it? | 12 | 2015-12-01 11:22:04 | <p>I just searched through the <a href="https://git-scm.com/docs/git-config" rel="noreferrer"><code>git-config(1)</code></a>, <a href="https://git-scm.com/docs/git-log" rel="noreferrer"><code>git-log(1)</code></a> and <a href="https://git-scm.com/docs/git-show" rel="noreferrer"><code>git-show(1)</code></a> man pages of... | 2,268 | 793,172 | 2024-04-06 14:35:54 | 34,019,622 | 12 | 2015-12-01 11:44:28 | 6,309 | 2017-05-29 20:29:19 | https://stackoverflow.com/q/34019170 | https://stackoverflow.com/a/34019622 | <p>I confirm that this <code>--show-signature</code> option (initially introduced in <a href="https://github.com/git/git/commit/0c37f1fce6cb7997dbb2703d35eef0dfd86c5070" rel="noreferrer">commit 0c37f1f, Oct 2011, Git v1.7.9-rc0</a>) <del>has no config setting or environment variable</del>.</p>
<p>As illustrated by <a ... | <p>I confirm that this <code>--show-signature</code> option (initially introduced in <a href="https://github.com/git/git/commit/0c37f1fce6cb7997dbb2703d35eef0dfd86c5070" rel="noreferrer">commit 0c37f1f, Oct 2011, Git v1.7.9-rc0</a>) <del>has no config setting or environment variable</del>.</p> <p>As illustrated by <a ... | 119, 942, 6735, 17782 | digital-signature, git, gnupg, logging | <h1>What to put into ~/.gitconfig to imply --show-signature for every git subcommand that supports it?</h1>
<p>I just searched through the <a href="https://git-scm.com/docs/git-config" rel="noreferrer"><code>git-config(1)</code></a>, <a href="https://git-scm.com/docs/git-log" rel="noreferrer"><code>git-log(1)</code></a... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 22,995 | git | # What to put into ~/.gitconfig to imply --show-signature for every git subcommand that supports it?
I just searched through the [`git-config(1)`](https://git-scm.com/docs/git-config), [`git-log(1)`](https://git-scm.com/docs/git-log) and [`git-show(1)`](https://git-scm.com/docs/git-show) man pages of git 2.6.2, but ha... | I confirm that this `--show-signature` option (initially introduced in [commit 0c37f1f, Oct 2011, Git v1.7.9-rc0](https://github.com/git/git/commit/0c37f1fce6cb7997dbb2703d35eef0dfd86c5070)) ~~has no config setting or environment variable~~.
As illustrated by [commit f2fef7b](https://github.com/git/git/commit/f2fef7b5... |
32209616 | Why is "git describe" showing an older tag version on my clean git repo copy? | 12 | 2015-08-25 16:44:39 | <p><strong>Some background:</strong></p>
<p>I currently have two local git repos which point to the same origin/master project. The reason I have two git repos is so that I have a clean master copy that I can use whenever I need and the one copy which my sandbox where I can apply changes, commit, etc. It is probably... | 5,997 | 2,532,191 | 2015-08-26 07:08:14 | 32,209,958 | 12 | 2015-08-25 17:02:36 | 2,541,573 | 2015-08-26 07:08:14 | https://stackoverflow.com/q/32209616 | https://stackoverflow.com/a/32209958 | <blockquote>
<p>A co-worker originally created a lightweight tag for 1.0.2, but we deleted it and re-tagged it as an annotated version with the same number. They committed the change via git push to the remote repo. I pulled down the latest changes on both my local git instances.</p>
</blockquote>
<p>Unless you use ... | <blockquote> <p>A co-worker originally created a lightweight tag for 1.0.2, but we deleted it and re-tagged it as an annotated version with the same number. They committed the change via git push to the remote repo. I pulled down the latest changes on both my local git instances.</p> </blockquote> <p>Unless you use ... | 115, 119, 5792, 60718, 80455 | git, git-describe, git-tag, tags, version | <h1>Why is "git describe" showing an older tag version on my clean git repo copy?</h1>
<p><strong>Some background:</strong></p>
<p>I currently have two local git repos which point to the same origin/master project. The reason I have two git repos is so that I have a clean master copy that I can use whenever I need an... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 22,998 | git | # Why is "git describe" showing an older tag version on my clean git repo copy?
**Some background:**
I currently have two local git repos which point to the same origin/master project. The reason I have two git repos is so that I have a clean master copy that I can use whenever I need and the one copy which my sandbo... | > A co-worker originally created a lightweight tag for 1.0.2, but we deleted it and re-tagged it as an annotated version with the same number. They committed the change via git push to the remote repo. I pulled down the latest changes on both my local git instances.
Unless you use the `--tags` flag, `git describe` is ... |
27823940 | JGit - Pushing a branch and add upstream (-u option) | 12 | 2015-01-07 16:25:45 | <p>In <code>JGit</code>, I search a way to push a branch and add the upstream reference (tracking). </p>
<p>It is the option <code>-u</code> or <code>--set-upstream</code> into the <a href="https://www.kernel.org/pub/software/scm/git/docs/git-push.html" rel="noreferrer">push command</a>.</p>
<p>I don't see a method i... | 2,784 | 3,024,446 | 2020-08-05 17:31:27 | 27,825,315 | 12 | 2015-01-07 17:40:32 | 2,986,905 | 2020-08-05 17:31:27 | https://stackoverflow.com/q/27823940 | https://stackoverflow.com/a/27825315 | <p>The JGit <code>PushCommand</code> does not offer this functionality (yet), but you can modify the repository configuration like <code>--set-upstream</code> would.</p>
<p>If you pass a remote alias to <code>setRemote()</code> (like the snippet from the question suggests), you need to set the upstream like so:</p>
<pr... | <p>The JGit <code>PushCommand</code> does not offer this functionality (yet), but you can modify the repository configuration like <code>--set-upstream</code> would.</p> <p>If you pass a remote alias to <code>setRemote()</code> (like the snippet from the question suggests), you need to set the upstream like so:</p> <pr... | 17, 61058 | java, jgit | <h1>JGit - Pushing a branch and add upstream (-u option)</h1>
<p>In <code>JGit</code>, I search a way to push a branch and add the upstream reference (tracking). </p>
<p>It is the option <code>-u</code> or <code>--set-upstream</code> into the <a href="https://www.kernel.org/pub/software/scm/git/docs/git-push.html" rel... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 23,000 | git | # JGit - Pushing a branch and add upstream (-u option)
In `JGit`, I search a way to push a branch and add the upstream reference (tracking).
It is the option `-u` or `--set-upstream` into the [push command](https://www.kernel.org/pub/software/scm/git/docs/git-push.html).
I don't see a method in the class `PushComman... | The JGit `PushCommand` does not offer this functionality (yet), but you can modify the repository configuration like `--set-upstream` would.
If you pass a remote alias to `setRemote()` (like the snippet from the question suggests), you need to set the upstream like so:
```
StoredConfig config = git.getRepository().ge... |
24694509 | Pushing all submodules recursively | 12 | 2014-07-11 09:31:08 | <p>I wrote the below script to push all the changes in the workspace, both in the submodules and the superproject. However, it sounds a little odd that, it is this complex to do what I want. Is there any better way, that I'm missing?</p>
<pre><code>#!/bin/bash
if [ "$#" -ne 1 ]; then
echo "Illegal number of param... | 10,868 | 1,068,333 | 2021-07-26 12:58:52 | 24,694,904 | 12 | 2014-07-11 09:48:32 | 274,299 | 2014-07-11 09:48:32 | https://stackoverflow.com/q/24694509 | https://stackoverflow.com/a/24694904 | <p>git1.7.11 ([ANNOUNCE] Git 1.7.11.rc1) mentions:</p>
<blockquote>
<p>"git push --recurse-submodules" learned to optionally look into the histories of submodules bound to the superproject and push them
out.</p>
</blockquote>
<p>So you can use:</p>
<pre><code>git push --recurse-submodules=on-demand
</code></pre>... | <p>git1.7.11 ([ANNOUNCE] Git 1.7.11.rc1) mentions:</p> <blockquote> <p>"git push --recurse-submodules" learned to optionally look into the histories of submodules bound to the superproject and push them out.</p> </blockquote> <p>So you can use:</p> <pre><code>git push --recurse-submodules=on-demand </code></pre>... | 119, 41612 | git, git-submodules | <h1>Pushing all submodules recursively</h1>
<p>I wrote the below script to push all the changes in the workspace, both in the submodules and the superproject. However, it sounds a little odd that, it is this complex to do what I want. Is there any better way, that I'm missing?</p>
<pre><code>#!/bin/bash
if [ "$#" -ne... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 23,001 | git | # Pushing all submodules recursively
I wrote the below script to push all the changes in the workspace, both in the submodules and the superproject. However, it sounds a little odd that, it is this complex to do what I want. Is there any better way, that I'm missing?
```
#!/bin/bash
if [ "$#" -ne 1 ]; then
echo ... | git1.7.11 ([ANNOUNCE] Git 1.7.11.rc1) mentions:
> "git push --recurse-submodules" learned to optionally look into the histories of submodules bound to the superproject and push them
> out.
So you can use:
```
git push --recurse-submodules=on-demand
``` |
22388489 | Difference between the diff command 'diff -b' and 'git diff' | 12 | 2014-03-13 19:05:06 | <p>I have always used <code>diff -b</code> to make patches even when working on a <code>git repo</code>.</p>
<ol>
<li>What is the difference between the two, does <code>git diff / git format-patch</code> also internally makes use of the linux/unix <code>diff</code> command? (I know the difference between <code>git dif... | 6,748 | 1,755,108 | 2014-03-13 19:23:28 | 22,388,869 | 12 | 2014-03-13 19:23:28 | 1,256,452 | 2014-03-13 19:23:28 | https://stackoverflow.com/q/22388489 | https://stackoverflow.com/a/22388869 | <p>In order:</p>
<ol>
<li><p>Git has its own built-in diff but the outputs of both are quite similar, given the right options. Using the built-in diff and the <code>git diff</code> front-end gets you a whole lot of automation, plus the output is always something <code>git apply</code> or <code>git am</code> will like... | <p>In order:</p> <ol> <li><p>Git has its own built-in diff but the outputs of both are quite similar, given the right options. Using the built-in diff and the <code>git diff</code> front-end gets you a whole lot of automation, plus the output is always something <code>git apply</code> or <code>git am</code> will like... | 119, 606, 2132, 9033, 94361 | diff, git, git-apply, git-diff, patch | <h1>Difference between the diff command 'diff -b' and 'git diff'</h1>
<p>I have always used <code>diff -b</code> to make patches even when working on a <code>git repo</code>.</p>
<ol>
<li>What is the difference between the two, does <code>git diff / git format-patch</code> also internally makes use of the linux/unix <... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 23,002 | git | # Difference between the diff command 'diff -b' and 'git diff'
I have always used `diff -b` to make patches even when working on a `git repo`.
1. What is the difference between the two, does `git diff / git format-patch` also internally makes use of the linux/unix `diff` command? (I know the difference between `git d... | In order:
1. Git has its own built-in diff but the outputs of both are quite similar, given the right options. Using the built-in diff and the `git diff` front-end gets you a whole lot of automation, plus the output is always something `git apply` or `git am` will like. In short, it's just a lot more *convenient*.
2. ... |
9013411 | Rebase a merge commit | 12 | 2012-01-26 02:50:18 | <p>Suppose my Git repository initially has two branches: Foo and Bar. </p>
<pre>
... β Foo
... β Bar
</pre>
<p>I create a third branch, FooBar in which I commit the merge of the two other branches.</p>
<pre>
... β Foo βββ
FooBar
... β Bar βββ
</pre>
<p>FooBar is now one commit ahead of both Foo and Bar... | 1,757 | 1,114,052 | 2014-02-21 08:08:43 | 21,928,762 | 12 | 2014-02-21 08:08:43 | 3,336,158 | 2014-02-21 08:08:43 | https://stackoverflow.com/q/9013411 | https://stackoverflow.com/a/21928762 | <p>I realize this is quite an old topic but since I found this question while facing a similar situation I could as well tell what I used in the end.</p>
<pre><code>git checkout FooBar
git rebase -p --onto Foo A
</code></pre>
<p>I tried to use the names from the original question. Note especially that <code>A</code> ... | <p>I realize this is quite an old topic but since I found this question while facing a similar situation I could as well tell what I used in the end.</p> <pre><code>git checkout FooBar git rebase -p --onto Foo A </code></pre> <p>I tried to use the names from the original question. Note especially that <code>A</code> ... | 119, 8974 | git, rebase | <h1>Rebase a merge commit</h1>
<p>Suppose my Git repository initially has two branches: Foo and Bar. </p>
<pre>
... β Foo
... β Bar
</pre>
<p>I create a third branch, FooBar in which I commit the merge of the two other branches.</p>
<pre>
... β Foo βββ
FooBar
... β Bar βββ
</pre>
<p>FooBar is now one c... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 23,003 | git | # Rebase a merge commit
Suppose my Git repository initially has two branches: Foo and Bar.
```
... β Foo
... β Bar
```
I create a third branch, FooBar in which I commit the merge of the two other branches.
```
... β Foo βββ
FooBar
... β Bar βββ
```
FooBar is now one commit ahead of both Foo and Bar. N... | I realize this is quite an old topic but since I found this question while facing a similar situation I could as well tell what I used in the end.
```
git checkout FooBar
git rebase -p --onto Foo A
```
I tried to use the names from the original question. Note especially that `A` means the commit that is marked as A i... |
19683557 | Can't clone repo using git clone git://... - ok with git clone http:// | 12 | 2013-10-30 13:26:42 | <p>Git newbie here. I'm setting up git on a new Ubuntu VM and trying to clone some repos. The clone works for the following command:</p>
<pre><code>git clone http://github.com/organisation_name/repo_name
</code></pre>
<p>(after prompt for username/password), but fails for </p>
<pre><code>git clone git://github.com/o... | 53,375 | 1,826,896 | 2018-01-09 10:49:39 | 19,683,888 | 12 | 2013-10-30 13:40:22 | 1,860,929 | 2013-10-30 13:46:08 | https://stackoverflow.com/q/19683557 | https://stackoverflow.com/a/19683888 | <p>Well, I think you are using the wrong url in your second case</p>
<p>Try this instead </p>
<pre><code>git clone git@github.com:organisation_name/repo_name.git
</code></pre>
<p>The difference is the <code>:</code> in the url when using <code>git@</code> vs the <code>/</code> you are currently using, and the extra ... | <p>Well, I think you are using the wrong url in your second case</p> <p>Try this instead </p> <pre><code>git clone git@github.com:organisation_name/repo_name.git </code></pre> <p>The difference is the <code>:</code> in the url when using <code>git@</code> vs the <code>/</code> you are currently using, and the extra ... | 119, 5210, 34099 | git, git-clone, http | <h1>Can't clone repo using git clone git://... - ok with git clone http://</h1>
<p>Git newbie here. I'm setting up git on a new Ubuntu VM and trying to clone some repos. The clone works for the following command:</p>
<pre><code>git clone http://github.com/organisation_name/repo_name
</code></pre>
<p>(after prompt for... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 23,005 | git | # Can't clone repo using git clone git://... - ok with git clone http://
Git newbie here. I'm setting up git on a new Ubuntu VM and trying to clone some repos. The clone works for the following command:
```
git clone http://github.com/organisation_name/repo_name
```
(after prompt for username/password), but fails fo... | Well, I think you are using the wrong url in your second case
Try this instead
```
git clone git@github.com:organisation_name/repo_name.git
```
The difference is the `:` in the url when using `git@` vs the `/` you are currently using, and the extra `.git` at the end.
This should be the same url if you go to github ... |
12133510 | In Git, removing DLL and PDB files that have accidently been committed | 12 | 2012-08-26 20:11:04 | <p>I have a git repo that I need to get working without conflicts. It is .net/c# mvc repo. The problem is dll and pdb files. These files have been accidentally committed to the repo so when I do my initial <code>git pull</code>, I get all these files committed by another developer. </p>
<p>I have setup the <code>.giti... | 9,979 | 1,132,772 | 2019-09-30 12:51:28 | 12,133,584 | 12 | 2012-08-26 20:19:24 | 6,309 | 2012-08-26 20:19:24 | https://stackoverflow.com/q/12133510 | https://stackoverflow.com/a/12133584 | <p>You need to remove those file first (<code>git rm</code>), before seeing your <code>.gitignore</code> directoves applied to your git repo.</p>
<p>You can remove those files only from the index if you want to keep them on the working tree.</p>
<pre><code>git rm -r --cached a.dll
</code></pre>
<p>(See "<a href="htt... | <p>You need to remove those file first (<code>git rm</code>), before seeing your <code>.gitignore</code> directoves applied to your git repo.</p> <p>You can remove those files only from the index if you want to keep them on the working tree.</p> <pre><code>git rm -r --cached a.dll </code></pre> <p>(See "<a href="htt... | 1, 119 | .net, git | <h1>In Git, removing DLL and PDB files that have accidently been committed</h1>
<p>I have a git repo that I need to get working without conflicts. It is .net/c# mvc repo. The problem is dll and pdb files. These files have been accidentally committed to the repo so when I do my initial <code>git pull</code>, I get all t... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 23,007 | git | # In Git, removing DLL and PDB files that have accidently been committed
I have a git repo that I need to get working without conflicts. It is .net/c# mvc repo. The problem is dll and pdb files. These files have been accidentally committed to the repo so when I do my initial `git pull`, I get all these files committed... | You need to remove those file first (`git rm`), before seeing your `.gitignore` directoves applied to your git repo.
You can remove those files only from the index if you want to keep them on the working tree.
```
git rm -r --cached a.dll
```
(See "[`.gitignore` file not ignoring](https://stackoverflow.com/questions... |
9232126 | Will a git checkout delete files that shouldn't be there? | 12 | 2012-02-10 17:31:58 | <p>If I set up a post-recieve hook in git like </p>
<pre><code>#!/bin/sh
GIT_WORK_TREE=/var/www/www.example.org git checkout -f
</code></pre>
<p>Will that delete files that are on the server but not on my local git repo?</p>
<p>If it will, is there any way to stop that?</p>
| 8,370 | 465,546 | 2012-02-10 20:40:32 | 9,234,498 | 12 | 2012-02-10 20:40:32 | 192,896 | 2012-02-10 20:40:32 | https://stackoverflow.com/q/9232126 | https://stackoverflow.com/a/9234498 | <p>It depends if the files will be deleted depending if they already existed in the repository prior to the checkout.</p>
<p>If the files that are on the server (/var/www/www.example.org) are tracked in the repo on the server but the new checkout includes a change that removed them then they will be removed on the ser... | <p>It depends if the files will be deleted depending if they already existed in the repository prior to the checkout.</p> <p>If the files that are on the server (/var/www/www.example.org) are tracked in the repo on the server but the new checkout includes a change that removed them then they will be removed on the ser... | 119 | git | <h1>Will a git checkout delete files that shouldn't be there?</h1>
<p>If I set up a post-recieve hook in git like </p>
<pre><code>#!/bin/sh
GIT_WORK_TREE=/var/www/www.example.org git checkout -f
</code></pre>
<p>Will that delete files that are on the server but not on my local git repo?</p>
<p>If it will, is there a... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 23,008 | git | # Will a git checkout delete files that shouldn't be there?
If I set up a post-recieve hook in git like
```
#!/bin/sh
GIT_WORK_TREE=/var/www/www.example.org git checkout -f
```
Will that delete files that are on the server but not on my local git repo?
If it will, is there any way to stop that? | It depends if the files will be deleted depending if they already existed in the repository prior to the checkout.
If the files that are on the server (/var/www/www.example.org) are tracked in the repo on the server but the new checkout includes a change that removed them then they will be removed on the server side.
... |
3962092 | How to digitally sign Inno Setup generated uninstallation file? | 12 | 2010-10-18 18:15:29 | <p><a href="https://en.wikipedia.org/wiki/Windows_Hardware_Certification_Kit" rel="nofollow noreferrer">Windows Logo Program</a> requires that the <code>unins000.exe</code>, generated by Inno Setup, is signed.
The only way I devised to do that is by unpacking the installer, signing and then repacking it again. Isn't th... | 5,756 | 48,465 | 2024-10-08 08:54:47 | 3,962,454 | 12 | 2010-10-18 19:06:23 | 314,193 | 2024-10-08 08:53:36 | https://stackoverflow.com/q/3962092 | https://stackoverflow.com/a/3962454 | <p>In version 5.2.4 of Inno Setup, a new <code>[Setup]</code> section directive was added to help sign setup.exe and the uninstall:</p>
<blockquote>
<p>Added new [Setup] section directive:
<code>SignTool</code>, which makes it possible to
further automate digital signing of
Setup and Uninstall. See the help file
for mo... | <p>In version 5.2.4 of Inno Setup, a new <code>[Setup]</code> section directive was added to help sign setup.exe and the uninstall:</p> <blockquote> <p>Added new [Setup] section directive: <code>SignTool</code>, which makes it possible to further automate digital signing of Setup and Uninstall. See the help file for mo... | 64, 3942, 14038, 17782 | digital-signature, inno-setup, uninstallation, windows | <h1>How to digitally sign Inno Setup generated uninstallation file?</h1>
<p><a href="https://en.wikipedia.org/wiki/Windows_Hardware_Certification_Kit" rel="nofollow noreferrer">Windows Logo Program</a> requires that the <code>unins000.exe</code>, generated by Inno Setup, is signed.
The only way I devised to do that is ... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 23,009 | git | # How to digitally sign Inno Setup generated uninstallation file?
[Windows Logo Program](https://en.wikipedia.org/wiki/Windows_Hardware_Certification_Kit) requires that the `unins000.exe`, generated by Inno Setup, is signed.
The only way I devised to do that is by unpacking the installer, signing and then repacking it... | In version 5.2.4 of Inno Setup, a new `[Setup]` section directive was added to help sign setup.exe and the uninstall:
> Added new [Setup] section directive:
> `SignTool`, which makes it possible to
> further automate digital signing of
> Setup and Uninstall. See the help file
> for more information.
References:
<ht... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.