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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
5860888 | git:// through proxy | 53 | 2011-05-02 18:28:34 | <p>I'm behind a firewall that is blocking port 9418 (git) and am trying to install some tools that are explicitly doing a checkout of <code>git://github.com/...</code>, so I can't switch to https for the checkout.</p>
<p>So I'm wondering if it's possible to redirect all traffic to port 9418 through a proxy and if so ho... | 42,267 | null | 2022-04-14 23:03:49 | 5,862,009 | 22 | 2011-05-02 20:17:33 | 6,236 | 2011-05-02 20:17:33 | https://stackoverflow.com/q/5860888 | https://stackoverflow.com/a/5862009 | <p>Have a look at <code>core.gitproxy</code> setting in <a href="http://git-scm.com/docs/git-config" rel="noreferrer">Git config</a>.</p>
<p>Quick googling revealed this script that may be useful (or may not — I did not try it): <a href="https://gist.github.com/49288" rel="noreferrer">https://gist.github.com/49288</a>... | <p>Have a look at <code>core.gitproxy</code> setting in <a href="http://git-scm.com/docs/git-config" rel="noreferrer">Git config</a>.</p> <p>Quick googling revealed this script that may be useful (or may not — I did not try it): <a href="https://gist.github.com/49288" rel="noreferrer">https://gist.github.com/49288</a>... | 119, 760, 32868 | git, git-config, proxy | <h1>git:// through proxy</h1>
<p>I'm behind a firewall that is blocking port 9418 (git) and am trying to install some tools that are explicitly doing a checkout of <code>git://github.com/...</code>, so I can't switch to https for the checkout.</p>
<p>So I'm wondering if it's possible to redirect all traffic to port 941... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 20,087 | git | # git:// through proxy
I'm behind a firewall that is blocking port 9418 (git) and am trying to install some tools that are explicitly doing a checkout of `git://github.com/...`, so I can't switch to https for the checkout.
So I'm wondering if it's possible to redirect all traffic to port 9418 through a proxy and if s... | Have a look at `core.gitproxy` setting in [Git config](http://git-scm.com/docs/git-config).
Quick googling revealed this script that may be useful (or may not — I did not try it): <https://gist.github.com/49288> |
22067873 | Troubleshooting misplaced .git directory (nothing to commit) | 51 | 2014-02-27 12:00:02 | <p>I started getting this message. No matter what I edit and try to commit, it says there is nothing to commit. Looks like git does not see my working directory and looking somewhere else. </p>
<p>If I run <code>git status</code> it outputs the same:</p>
<pre><code>nothing to commit (working directory clean)
</code><... | 148,624 | 1,455,384 | 2019-04-11 08:41:08 | 22,088,313 | 22 | 2014-02-28 06:55:23 | 1,455,384 | 2014-02-28 06:55:23 | https://stackoverflow.com/q/22067873 | https://stackoverflow.com/a/22088313 | <p>Found what was wrong. I don't understand how, but <code>.git</code> directory path somehow was changed to other path than I was working in. So then anything I changed was not checked, because git was checking in other place. I noticed it, when I reinitialized it and it showed that it reinitialized entirely different... | <p>Found what was wrong. I don't understand how, but <code>.git</code> directory path somehow was changed to other path than I was working in. So then anything I changed was not checked, because git was checking in other place. I noticed it, when I reinitialized it and it showed that it reinitialized entirely different... | 119, 218, 53850 | directory, git, git-commit | <h1>Troubleshooting misplaced .git directory (nothing to commit)</h1>
<p>I started getting this message. No matter what I edit and try to commit, it says there is nothing to commit. Looks like git does not see my working directory and looking somewhere else. </p>
<p>If I run <code>git status</code> it outputs the same... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 20,088 | git | # Troubleshooting misplaced .git directory (nothing to commit)
I started getting this message. No matter what I edit and try to commit, it says there is nothing to commit. Looks like git does not see my working directory and looking somewhere else.
If I run `git status` it outputs the same:
```
nothing to commit (wo... | Found what was wrong. I don't understand how, but `.git` directory path somehow was changed to other path than I was working in. So then anything I changed was not checked, because git was checking in other place. I noticed it, when I reinitialized it and it showed that it reinitialized entirely different directory. Wh... |
25497881 | Git diff: is it possible to show ONLY changed lines | 46 | 2014-08-26 04:08:00 | <p>I'm trying to get only new version of lines which have changed and not all the other info which git diff shows.</p>
<p>For:</p>
<pre><code>git diff HEAD --no-ext-diff --unified=0 --exit-code -a --no-prefix
</code></pre>
<p>It shows:</p>
<pre><code>diff --git file1 file2
index d9db605..a884b50 100644
--- file1
++... | 35,305 | 90,096 | 2024-11-25 01:53:48 | 25,498,422 | 22 | 2014-08-26 05:06:24 | 1,870,481 | 2024-11-25 01:51:53 | https://stackoverflow.com/q/25497881 | https://stackoverflow.com/a/25498422 | <p>Only added lines does not make sense in all cases. If you replaced some block of text and you happened to include a single line which was there before, git has to match and guess. Usually the output of <code>git diff</code> could be used as input for <code>patch</code> afterwards and is therefore meaningful. Only t... | <p>Only added lines does not make sense in all cases. If you replaced some block of text and you happened to include a single line which was there before, git has to match and guess. Usually the output of <code>git diff</code> could be used as input for <code>patch</code> afterwards and is therefore meaningful. Only t... | 119, 606, 9033 | diff, git, git-diff | <h1>Git diff: is it possible to show ONLY changed lines</h1>
<p>I'm trying to get only new version of lines which have changed and not all the other info which git diff shows.</p>
<p>For:</p>
<pre><code>git diff HEAD --no-ext-diff --unified=0 --exit-code -a --no-prefix
</code></pre>
<p>It shows:</p>
<pre><code>diff... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 20,089 | git | # Git diff: is it possible to show ONLY changed lines
I'm trying to get only new version of lines which have changed and not all the other info which git diff shows.
For:
```
git diff HEAD --no-ext-diff --unified=0 --exit-code -a --no-prefix
```
It shows:
```
diff --git file1 file2
index d9db605..a884b50 100644
--... | Only added lines does not make sense in all cases. If you replaced some block of text and you happened to include a single line which was there before, git has to match and guess. Usually the output of `git diff` could be used as input for `patch` afterwards and is therefore meaningful. Only the added lines are not pre... |
23000086 | (git) diff output relative path? | 45 | 2014-04-10 22:15:39 | <p>I need to get some diffs in my repo that are not relative to the base of the repo, but instead relative to a given base or given path.</p>
<p>By default I get:</p>
<pre><code>git diff
diff --git a/path/to/file b/path/to/file
index 0cc125e..9bf911e 100644
--- a/path/to/file
+++ b/path/to/file
</code></pre>
<p>But ... | 24,987 | 318,904 | 2017-11-23 17:37:01 | 23,000,227 | 22 | 2014-04-10 22:27:57 | 1,256,452 | 2014-04-10 22:27:57 | https://stackoverflow.com/q/23000086 | https://stackoverflow.com/a/23000227 | <p>Seems like <code>--src-prefix</code> and <code>--dst-prefix</code> <em>are</em> what you're asking for:</p>
<pre><code>$ cd .../git/builtin
$ ed - var.c << end
> 0a
> xxx
> .
> wq
> end
$ git diff
diff --git a/builtin/var.c b/builtin/var.c
index aedbb53..5210013 100644
--- a/builtin/var.c
+++ b... | <p>Seems like <code>--src-prefix</code> and <code>--dst-prefix</code> <em>are</em> what you're asking for:</p> <pre><code>$ cd .../git/builtin $ ed - var.c << end > 0a > xxx > . > wq > end $ git diff diff --git a/builtin/var.c b/builtin/var.c index aedbb53..5210013 100644 --- a/builtin/var.c +++ b... | 119, 606, 2132, 9033, 91850 | diff, difference, git, git-diff, patch | <h1>(git) diff output relative path?</h1>
<p>I need to get some diffs in my repo that are not relative to the base of the repo, but instead relative to a given base or given path.</p>
<p>By default I get:</p>
<pre><code>git diff
diff --git a/path/to/file b/path/to/file
index 0cc125e..9bf911e 100644
--- a/path/to/file... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 20,090 | git | # (git) diff output relative path?
I need to get some diffs in my repo that are not relative to the base of the repo, but instead relative to a given base or given path.
By default I get:
```
git diff
diff --git a/path/to/file b/path/to/file
index 0cc125e..9bf911e 100644
--- a/path/to/file
+++ b/path/to/file
```
Bu... | Seems like `--src-prefix` and `--dst-prefix` *are* what you're asking for:
```
$ cd .../git/builtin
$ ed - var.c << end
> 0a
> xxx
> .
> wq
> end
$ git diff
diff --git a/builtin/var.c b/builtin/var.c
index aedbb53..5210013 100644
--- a/builtin/var.c
+++ b/builtin/var.c
@@ -1,3 +1,4 @@
+xxx
/*
* GIT - The informatio... |
8651708 | Git, adding files to repository gives fatal error for LF ->CRLF | 41 | 2011-12-28 04:02:21 | <p>I'm new to git and I need some help. I'm using msysgit on windows.</p>
<p>When I execute the command <code>git add [folderName]</code> I get the response:</p>
<pre><code>fatal: LF would be replaced by CRLF in [.css file or .js file]
</code></pre>
<p>and then if you try to do a commit nothing happens.</p>
<pre><c... | 29,461 | 619,656 | 2015-06-02 22:52:19 | 8,652,690 | 22 | 2011-12-28 06:34:40 | 1,864,976 | 2011-12-29 20:28:35 | https://stackoverflow.com/q/8651708 | https://stackoverflow.com/a/8652690 | <p>Trust the code editors to manipulate your line endings. Auto crlf should be false. Don't let source control get too smart. If don't need to have your source control tool to change your line endings, don't. This will hurt.</p>
<p>To reiterate from an accepted answer: "Unless you can see specific treatment which must... | <p>Trust the code editors to manipulate your line endings. Auto crlf should be false. Don't let source control get too smart. If don't need to have your source control tool to change your line endings, don't. This will hurt.</p> <p>To reiterate from an accepted answer: "Unless you can see specific treatment which must... | 119, 456, 3705, 21628, 59139 | core.autocrlf, git, msysgit, newline, version-control | <h1>Git, adding files to repository gives fatal error for LF ->CRLF</h1>
<p>I'm new to git and I need some help. I'm using msysgit on windows.</p>
<p>When I execute the command <code>git add [folderName]</code> I get the response:</p>
<pre><code>fatal: LF would be replaced by CRLF in [.css file or .js file]
</code></... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 20,093 | git | # Git, adding files to repository gives fatal error for LF ->CRLF
I'm new to git and I need some help. I'm using msysgit on windows.
When I execute the command `git add [folderName]` I get the response:
```
fatal: LF would be replaced by CRLF in [.css file or .js file]
```
and then if you try to do a commit nothing... | Trust the code editors to manipulate your line endings. Auto crlf should be false. Don't let source control get too smart. If don't need to have your source control tool to change your line endings, don't. This will hurt.
To reiterate from an accepted answer: "Unless you can see specific treatment which must deal with... |
2241055 | Django and VirtualEnv Development/Deployment Best Practices | 39 | 2010-02-10 23:14:20 | <p>Just curious how people are deploying their Django projects in combination with virtualenv</p>
<ul>
<li>More specifically, how do you keep your production virtualenv's synched correctly with your development machine?</li>
</ul>
<p>I use git for scm but I don't have my virtualenv inside the git repo - should I, or ... | 9,121 | 252,009 | 2013-02-07 21:15:42 | 2,243,060 | 22 | 2010-02-11 08:13:02 | 87,858 | 2013-02-07 21:15:42 | https://stackoverflow.com/q/2241055 | https://stackoverflow.com/a/2243060 | <p>I just set something like this up at work using pip, Fabric and git. The flow is basically like this, and borrows heavily from <a href="http://www.morethanseven.net/2009/07/27/fabric-django-git-apache-mod-wsgi-virtualenv-and-p/" rel="nofollow noreferrer">this script</a>:</p>
<ol>
<li>In our source tree, we maintai... | <p>I just set something like this up at work using pip, Fabric and git. The flow is basically like this, and borrows heavily from <a href="http://www.morethanseven.net/2009/07/27/fabric-django-git-apache-mod-wsgi-virtualenv-and-p/" rel="nofollow noreferrer">this script</a>:</p> <ol> <li>In our source tree, we maintai... | 16, 119, 243, 14529 | django, git, python, virtualenv | <h1>Django and VirtualEnv Development/Deployment Best Practices</h1>
<p>Just curious how people are deploying their Django projects in combination with virtualenv</p>
<ul>
<li>More specifically, how do you keep your production virtualenv's synched correctly with your development machine?</li>
</ul>
<p>I use git for s... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 20,094 | git | # Django and VirtualEnv Development/Deployment Best Practices
Just curious how people are deploying their Django projects in combination with virtualenv
- More specifically, how do you keep your production virtualenv's synched correctly with your development machine?
I use git for scm but I don't have my virtualenv ... | I just set something like this up at work using pip, Fabric and git. The flow is basically like this, and borrows heavily from [this script](http://www.morethanseven.net/2009/07/27/fabric-django-git-apache-mod-wsgi-virtualenv-and-p/):
1. In our source tree, we maintain a requirements.txt file. We'll maintain this manu... |
907913 | There is any way to synchronize GIT and Subversion repositories? | 34 | 2009-05-25 20:11:06 | <p>I want to access a repository using both GIT and SVN clients. A way I imagined to do that is through automatic two-way migration: when a user PUSHes into the GIT repository, it is also COMMITed in the SVN repository and vice-versa.</p>
<p>There is any tool that would help me to do that?</p>
| 30,019 | 48,465 | 2012-08-28 08:44:25 | 907,937 | 22 | 2009-05-25 20:15:42 | 893 | 2009-05-25 20:15:42 | https://stackoverflow.com/q/907913 | https://stackoverflow.com/a/907937 | <p>The best way to do this is to use <a href="http://git-scm.com/docs/git-svn" rel="noreferrer"><code>git svn</code></a> as a Subversion client. This provides two-way integration between a Subversion repository and a Git repository. Once you have a Git repository, you can push that anywhere else to publish it.</p>
<p>... | <p>The best way to do this is to use <a href="http://git-scm.com/docs/git-svn" rel="noreferrer"><code>git svn</code></a> as a Subversion client. This provides two-way integration between a Subversion repository and a Git repository. Once you have a Git repository, you can push that anywhere else to publish it.</p> <p>... | 63, 119, 456 | git, svn, version-control | <h1>There is any way to synchronize GIT and Subversion repositories?</h1>
<p>I want to access a repository using both GIT and SVN clients. A way I imagined to do that is through automatic two-way migration: when a user PUSHes into the GIT repository, it is also COMMITed in the SVN repository and vice-versa.</p>
<p>The... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 20,097 | git | # There is any way to synchronize GIT and Subversion repositories?
I want to access a repository using both GIT and SVN clients. A way I imagined to do that is through automatic two-way migration: when a user PUSHes into the GIT repository, it is also COMMITed in the SVN repository and vice-versa.
There is any tool t... | The best way to do this is to use [`git svn`](http://git-scm.com/docs/git-svn) as a Subversion client. This provides two-way integration between a Subversion repository and a Git repository. Once you have a Git repository, you can push that anywhere else to publish it.
I do this regularly, at work there is a Subversio... |
3945382 | Git commit that doesn't override original authors in git blame | 33 | 2010-10-15 19:20:30 | <p>I've used a perl script to modify all tab characters in a php git repository and changed them all to 4 spaces.</p>
<pre><code>$ find -iname \*.php -exec perl -pi -e "s/\t/ /g" {} \
</code></pre>
<p>I can commit this change with <code>git commit</code>, but it will mark me as the author of all changed lines insi... | 8,382 | 477,347 | 2017-02-07 17:47:48 | 4,130,589 | 22 | 2010-11-09 04:45:12 | 160,709 | 2010-11-09 04:45:12 | https://stackoverflow.com/q/3945382 | https://stackoverflow.com/a/4130589 | <p>Thanks to wnoise on <a href="https://stackoverflow.com/questions/4112410/git-change-styling-whitespace-without-changing-ownership-blame">git: change styling (whitespace) without changing ownership/blame?</a>, I came up with this to run an arbitrary filter on git history, so using this you could rewrite history to m... | <p>Thanks to wnoise on <a href="https://stackoverflow.com/questions/4112410/git-change-styling-whitespace-without-changing-ownership-blame">git: change styling (whitespace) without changing ownership/blame?</a>, I came up with this to run an arbitrary filter on git history, so using this you could rewrite history to m... | 119, 53850, 105902 | git, git-blame, git-commit | <h1>Git commit that doesn't override original authors in git blame</h1>
<p>I've used a perl script to modify all tab characters in a php git repository and changed them all to 4 spaces.</p>
<pre><code>$ find -iname \*.php -exec perl -pi -e "s/\t/ /g" {} \
</code></pre>
<p>I can commit this change with <code>git co... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 20,098 | git | # Git commit that doesn't override original authors in git blame
I've used a perl script to modify all tab characters in a php git repository and changed them all to 4 spaces.
```
$ find -iname \*.php -exec perl -pi -e "s/\t/ /g" {} \
```
I can commit this change with `git commit`, but it will mark me as the auth... | Thanks to wnoise on [git: change styling (whitespace) without changing ownership/blame?](https://stackoverflow.com/questions/4112410/git-change-styling-whitespace-without-changing-ownership-blame), I came up with this to run an arbitrary filter on git history, so using this you could rewrite history to make it look lik... |
5980960 | Git repository in a Git repository | 31 | 2011-05-12 16:05:39 | <p>I have a Git repository including a Git repository.</p>
<pre><code>repo1/
.git/
files
repo2/
.git/
files
files
</code></pre>
<p>Is it possible to work with this architecture?</p>
| 35,026 | 571,409 | 2019-01-08 00:58:06 | 5,981,099 | 22 | 2011-05-12 16:16:28 | 6,309 | 2011-05-13 03:59:29 | https://stackoverflow.com/q/5980960 | https://stackoverflow.com/a/5981099 | <p>You can have nested git repos:<br>
The parent repo will simply <del>ignore nested repo</del>.</p>
<p><a href="https://stackoverflow.com/users/19750/jleedev">jleedev</a> comments and illustrates with this <a href="https://gist.github.com/969191" rel="nofollow noreferrer">gist script</a> that the parent repo
would ... | <p>You can have nested git repos:<br> The parent repo will simply <del>ignore nested repo</del>.</p> <p><a href="https://stackoverflow.com/users/19750/jleedev">jleedev</a> comments and illustrates with this <a href="https://gist.github.com/969191" rel="nofollow noreferrer">gist script</a> that the parent repo would ... | 119 | git | <h1>Git repository in a Git repository</h1>
<p>I have a Git repository including a Git repository.</p>
<pre><code>repo1/
.git/
files
repo2/
.git/
files
files
</code></pre>
<p>Is it possible to work with this architecture?</p>
| q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 20,099 | git | # Git repository in a Git repository
I have a Git repository including a Git repository.
```
repo1/
.git/
files
repo2/
.git/
files
files
```
Is it possible to work with this architecture? | You can have nested git repos:
The parent repo will simply ~~ignore nested repo~~.
[jleedev](https://stackoverflow.com/users/19750/jleedev) comments and illustrates with this [gist script](https://gist.github.com/969191) that the parent repo
would track the nested repo state through [a **gitlink**](http://www.kernel... |
24384951 | 'git checkout' docs claim working tree will change; why are edits not discarded? | 30 | 2014-06-24 11:03:12 | <p>I am new to Git and trying to wrap my head around the way branches work. According to the documentation, <code>git checkout</code>:</p>
<blockquote>
<p>Updates files in the working tree to match the version in the index or the specified tree. If >no paths are given, git checkout will also update HEAD to set the s... | 51,736 | 3,282,276 | 2023-12-10 16:48:28 | 24,385,511 | 22 | 2014-06-24 11:32:15 | 1,256,452 | 2021-10-06 21:28:04 | https://stackoverflow.com/q/24384951 | https://stackoverflow.com/a/24385511 | <p>Git has this general issue of cramming about eight or ten different things into one command. <strong>Note: Git 2.23 is splitting some of these up—helpful, to be sure, but also a very big change.</strong> (<em>Should Git 2.23 be called Git 3.0? Git 2.0 changed the behavior of <code>git add</code>, which seems to m... | <p>Git has this general issue of cramming about eight or ten different things into one command. <strong>Note: Git 2.23 is splitting some of these up—helpful, to be sure, but also a very big change.</strong> (<em>Should Git 2.23 be called Git 3.0? Git 2.0 changed the behavior of <code>git add</code>, which seems to m... | 119 | git | <h1>'git checkout' docs claim working tree will change; why are edits not discarded?</h1>
<p>I am new to Git and trying to wrap my head around the way branches work. According to the documentation, <code>git checkout</code>:</p>
<blockquote>
<p>Updates files in the working tree to match the version in the index or the ... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 20,101 | git | # 'git checkout' docs claim working tree will change; why are edits not discarded?
I am new to Git and trying to wrap my head around the way branches work. According to the documentation, `git checkout`:
> Updates files in the working tree to match the version in the index or the specified tree. If >no paths are give... | Git has this general issue of cramming about eight or ten different things into one command. **Note: Git 2.23 is splitting some of these up—helpful, to be sure, but also a very big change.** (*Should Git 2.23 be called Git 3.0? Git 2.0 changed the behavior of `git add`, which seems to me similar in degree.*) See also [... |
16304574 | How to list branches that contain an equivalent commit | 29 | 2013-04-30 16:19:57 | <p>In a prior question someone provided an answer for finding branches that contained an EXACT commit:</p>
<p><a href="https://stackoverflow.com/questions/1419623/how-to-list-branches-that-contain-a-given-commit/%20how-to-list-branches-that-contain-a-given-commit">How to list branches that contain a given commit</a></... | 6,278 | 1,410,669 | 2023-09-21 15:18:39 | 26,090,892 | 22 | 2014-09-29 00:11:08 | 4,021,077 | 2017-07-14 04:31:19 | https://stackoverflow.com/q/16304574 | https://stackoverflow.com/a/26090892 | <p>Before you can answer the question of which branches contain an equivalent commit you have to determine "which commits are equivalent". Once you have that, you simply use <code>git branch --contains</code> on each of the commits.</p>
<p>Unfortunately, there is no 100% reliable way to determine equivalent commits.</... | <p>Before you can answer the question of which branches contain an equivalent commit you have to determine "which commits are equivalent". Once you have that, you simply use <code>git branch --contains</code> on each of the commits.</p> <p>Unfortunately, there is no 100% reliable way to determine equivalent commits.</... | 119, 456, 96747 | git, git-cherry, version-control | <h1>How to list branches that contain an equivalent commit</h1>
<p>In a prior question someone provided an answer for finding branches that contained an EXACT commit:</p>
<p><a href="https://stackoverflow.com/questions/1419623/how-to-list-branches-that-contain-a-given-commit/%20how-to-list-branches-that-contain-a-give... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 20,102 | git | # How to list branches that contain an equivalent commit
In a prior question someone provided an answer for finding branches that contained an EXACT commit:
[How to list branches that contain a given commit](https://stackoverflow.com/questions/1419623/how-to-list-branches-that-contain-a-given-commit/%20how-to-list-br... | Before you can answer the question of which branches contain an equivalent commit you have to determine "which commits are equivalent". Once you have that, you simply use `git branch --contains` on each of the commits.
Unfortunately, there is no 100% reliable way to determine equivalent commits.
The most reliable met... |
16539779 | How to set the working directory to an older commit? | 29 | 2013-05-14 09:38:39 | <p>To track down at which point I broke a feature in my software, I need to review older versions of my repository. I just want to set the working directory to an older commit, play with the code, afterwards discard the changes, and then try another commit.</p>
<p>I do not want to change anything about commits, neithe... | 16,653 | 1,079,110 | 2016-10-11 16:03:38 | 16,539,830 | 22 | 2013-05-14 09:41:22 | 6,309 | 2013-05-14 10:27:12 | https://stackoverflow.com/q/16539779 | https://stackoverflow.com/a/16539830 | <p>A simple <code>git checkout old-sha1</code> can be a start, but the real command for that kind of task is:</p>
<p><strong><a href="http://git-scm.com/docs/git-bisect" rel="noreferrer"><code>git bisect</code></a></strong>.</p>
<blockquote>
<p>Find by binary search the change that introduced a bug </p>
</blockquo... | <p>A simple <code>git checkout old-sha1</code> can be a start, but the real command for that kind of task is:</p> <p><strong><a href="http://git-scm.com/docs/git-bisect" rel="noreferrer"><code>git bisect</code></a></strong>.</p> <blockquote> <p>Find by binary search the change that introduced a bug </p> </blockquo... | 119, 10201 | git, working-directory | <h1>How to set the working directory to an older commit?</h1>
<p>To track down at which point I broke a feature in my software, I need to review older versions of my repository. I just want to set the working directory to an older commit, play with the code, afterwards discard the changes, and then try another commit.<... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 20,104 | git | # How to set the working directory to an older commit?
To track down at which point I broke a feature in my software, I need to review older versions of my repository. I just want to set the working directory to an older commit, play with the code, afterwards discard the changes, and then try another commit.
I do not... | A simple `git checkout old-sha1` can be a start, but the real command for that kind of task is:
**[`git bisect`](http://git-scm.com/docs/git-bisect)**.
> Find by binary search the change that introduced a bug
If you have a script able to test if your working tree "works" or not, you can execute that script on previo... |
12566023 | Sharing rerere cache | 29 | 2012-09-24 13:26:04 | <p>I've seen people recommend that all developers set up a symlink on their machine from <code>C:\project\.git\rr-cache</code> to a shared folder <code>\\server\rr-cache</code>.</p>
<p>However, it would seem more convenient to share the folder by including it in the git repository itself, if that is possible. I've see... | 7,391 | null | 2014-05-09 09:59:36 | 12,590,387 | 22 | 2012-09-25 20:15:40 | 1,864,976 | 2013-08-20 16:41:53 | https://stackoverflow.com/q/12566023 | https://stackoverflow.com/a/12590387 | <p>It can be shared via a dedicated branch. You want to stop if there is a conflict on that branch and resolve it as it means that there were attempts to solve the same conflict in 2 different ways. Needless to say, that will be the exception to the rule.</p>
<p>For the others on this question, google "Branch per Feat... | <p>It can be shared via a dedicated branch. You want to stop if there is a conflict on that branch and resolve it as it means that there were attempts to solve the same conflict in 2 different ways. Needless to say, that will be the exception to the rule.</p> <p>For the others on this question, google "Branch per Feat... | 119, 456, 28897, 62599, 83367 | git, git-merge, git-rerere, merge-conflict-resolution, version-control | <h1>Sharing rerere cache</h1>
<p>I've seen people recommend that all developers set up a symlink on their machine from <code>C:\project\.git\rr-cache</code> to a shared folder <code>\\server\rr-cache</code>.</p>
<p>However, it would seem more convenient to share the folder by including it in the git repository itself,... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 20,105 | git | # Sharing rerere cache
I've seen people recommend that all developers set up a symlink on their machine from `C:\project\.git\rr-cache` to a shared folder `\\server\rr-cache`.
However, it would seem more convenient to share the folder by including it in the git repository itself, if that is possible. I've seen people... | It can be shared via a dedicated branch. You want to stop if there is a conflict on that branch and resolve it as it means that there were attempts to solve the same conflict in 2 different ways. Needless to say, that will be the exception to the rule.
For the others on this question, google "Branch per Feature" to se... |
2835791 | git-svn: reset tracking for master | 28 | 2010-05-14 16:23:35 | <p>I'm using <code>git-svn</code> to work with an SVN repository. My working copies have been created using <code>git svn clone -s http://foo.bar/myproject</code> so that my working copy follows the default directory scheme for SVN (trunk, tags, branches).</p>
<p>Recently I've been working on a branch which was create... | 10,858 | 30,478 | 2012-05-12 06:33:59 | 3,469,953 | 22 | 2010-08-12 16:39:32 | 141,502 | 2010-08-12 16:39:32 | https://stackoverflow.com/q/2835791 | https://stackoverflow.com/a/3469953 | <p>When there are no changes on trunk, git does a fast-forward merge and simply sets the local "master" branch to the commit on your branch. Git-svn doesn't know how to commit fast-forward merges back to trunk, in fact it thinks "master" now is pointing to the svn branch.</p>
<p>To work around this, use <code>git merg... | <p>When there are no changes on trunk, git does a fast-forward merge and simply sets the local "master" branch to the commit on your branch. Git-svn doesn't know how to commit fast-forward merges back to trunk, in fact it thinks "master" now is pointing to the svn branch.</p> <p>To work around this, use <code>git merg... | 63, 119, 717, 6452 | git, git-svn, merge, svn | <h1>git-svn: reset tracking for master</h1>
<p>I'm using <code>git-svn</code> to work with an SVN repository. My working copies have been created using <code>git svn clone -s http://foo.bar/myproject</code> so that my working copy follows the default directory scheme for SVN (trunk, tags, branches).</p>
<p>Recently I'... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 20,106 | git | # git-svn: reset tracking for master
I'm using `git-svn` to work with an SVN repository. My working copies have been created using `git svn clone -s http://foo.bar/myproject` so that my working copy follows the default directory scheme for SVN (trunk, tags, branches).
Recently I've been working on a branch which was ... | When there are no changes on trunk, git does a fast-forward merge and simply sets the local "master" branch to the commit on your branch. Git-svn doesn't know how to commit fast-forward merges back to trunk, in fact it thinks "master" now is pointing to the svn branch.
To work around this, use `git merge --no-ff` when... |
13117736 | Jenkins "tag" build with git | 27 | 2012-10-29 07:52:03 | <p>There is an option on jenkins when using git to "tag" the build.</p>
<p>What does this do and how do I use it? I assume I can tag the build at that version but I'm struggling to figure out how to push that tag - it's not so useful unless I can push the tag.</p>
| 72,460 | 117,839 | 2012-10-29 08:15:09 | 13,117,975 | 22 | 2012-10-29 08:15:09 | 6,309 | 2012-10-29 08:15:09 | https://stackoverflow.com/q/13117736 | https://stackoverflow.com/a/13117975 | <p>You don't always want to push <em>all</em> the build tags, because there could be a lot of them, depending on your build cycle.</p>
<p>But any task scheduler (like Jenkins) will tag a build in case you want to get back to that specific code and debug it (because even though the build might have succeeded, the end r... | <p>You don't always want to push <em>all</em> the build tags, because there could be a lot of them, depending on your build cycle.</p> <p>But any task scheduler (like Jenkins) will tag a build in case you want to get back to that specific code and debug it (because even though the build might have succeeded, the end r... | 119, 64999 | git, jenkins | <h1>Jenkins "tag" build with git</h1>
<p>There is an option on jenkins when using git to "tag" the build.</p>
<p>What does this do and how do I use it? I assume I can tag the build at that version but I'm struggling to figure out how to push that tag - it's not so useful unless I can push the tag.</p>
| q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 20,107 | git | # Jenkins "tag" build with git
There is an option on jenkins when using git to "tag" the build.
What does this do and how do I use it? I assume I can tag the build at that version but I'm struggling to figure out how to push that tag - it's not so useful unless I can push the tag. | You don't always want to push *all* the build tags, because there could be a lot of them, depending on your build cycle.
But any task scheduler (like Jenkins) will tag a build in case you want to get back to that specific code and debug it (because even though the build might have succeeded, the end result might have ... |
7130639 | Make a local copy of a remote git repository | 27 | 2011-08-20 08:20:00 | <p>I am not very familiar with the terminology or practices and procedures of version control.</p>
<p>Here is what I want to do :</p>
<ol>
<li><p>I want to download a folder from a git repository from the Internet. Is cloning the right way to do it ? WOn't cloning keep the unnecessary meta-data files ? Is there a way... | 58,100 | 446,514 | 2017-06-17 04:49:06 | 7,130,660 | 22 | 2011-08-20 08:24:00 | 6,309 | 2017-06-17 04:49:06 | https://stackoverflow.com/q/7130639 | https://stackoverflow.com/a/7130660 | <ol>
<li>Cloning is the right way, but will download all the directories of your remote Git repo.<br>
See <a href="https://git-scm.com/docs/git-clone" rel="noreferrer"><code>git clone</code> of Git Reference</a>.</li>
<li>The clone command will create a repo with a working tree already checked out in it, and a .git rep... | <ol> <li>Cloning is the right way, but will download all the directories of your remote Git repo.<br> See <a href="https://git-scm.com/docs/git-clone" rel="noreferrer"><code>git clone</code> of Git Reference</a>.</li> <li>The clone command will create a repo with a working tree already checked out in it, and a .git rep... | 119, 456 | git, version-control | <h1>Make a local copy of a remote git repository</h1>
<p>I am not very familiar with the terminology or practices and procedures of version control.</p>
<p>Here is what I want to do :</p>
<ol>
<li><p>I want to download a folder from a git repository from the Internet. Is cloning the right way to do it ? WOn't cloning... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 20,108 | git | # Make a local copy of a remote git repository
I am not very familiar with the terminology or practices and procedures of version control.
Here is what I want to do :
1. I want to download a folder from a git repository from the Internet. Is cloning the right way to do it ? WOn't cloning keep the unnecessary meta-da... | 1. Cloning is the right way, but will download all the directories of your remote Git repo.
See [`git clone` of Git Reference](https://git-scm.com/docs/git-clone).
2. The clone command will create a repo with a working tree already checked out in it, and a .git representing your full repo
3. You need to have at le... |
3516899 | git rebase resolve conflicts again and again? | 26 | 2010-08-18 21:34:11 | <p>every time i git rebase my patchset on a new version of the original, do i have to manually resolve the conflicts again and again?</p>
| 5,562 | 376,258 | 2011-10-27 16:46:02 | 3,516,907 | 22 | 2010-08-18 21:35:25 | 116,908 | 2011-10-27 16:46:02 | https://stackoverflow.com/q/3516899 | https://stackoverflow.com/a/3516907 | <p>Check out <a href="http://linux.die.net/man/1/git-rerere" rel="noreferrer"><code>git-rerere</code></a>.</p>
| <p>Check out <a href="http://linux.die.net/man/1/git-rerere" rel="noreferrer"><code>git-rerere</code></a>.</p> | 119 | git | <h1>git rebase resolve conflicts again and again?</h1>
<p>every time i git rebase my patchset on a new version of the original, do i have to manually resolve the conflicts again and again?</p>
| q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 20,109 | git | # git rebase resolve conflicts again and again?
every time i git rebase my patchset on a new version of the original, do i have to manually resolve the conflicts again and again? | Check out [`git-rerere`](http://linux.die.net/man/1/git-rerere). |
28619210 | Configure bower to install only dist folder | 25 | 2015-02-19 23:43:41 | <p>I am trying to learn tools such as bower/grunt/requirejs in order to speed up the development process for my website and to make my code more modularized/efficient. I am currently following <a href="http://code.tutsplus.com/tutorials/a-requirejs-backbone-and-bower-starter-template--net-29211">this tutorial</a>. H... | 19,369 | 2,333,753 | 2015-08-05 23:06:36 | 28,623,482 | 22 | 2015-02-20 07:13:58 | 1,228,454 | 2015-02-20 07:13:58 | https://stackoverflow.com/q/28619210 | https://stackoverflow.com/a/28623482 | <p>What you're looking for is the <em>ignore</em> property in <code>bower.json</code>: <a href="https://github.com/bower/bower.json-spec" rel="noreferrer">https://github.com/bower/bower.json-spec</a></p>
<p>The developer of the module can use the <em>ignore</em> attribute to exclude files when the module is downloaded... | <p>What you're looking for is the <em>ignore</em> property in <code>bower.json</code>: <a href="https://github.com/bower/bower.json-spec" rel="noreferrer">https://github.com/bower/bower.json-spec</a></p> <p>The developer of the module can use the <em>ignore</em> attribute to exclude files when the module is downloaded... | 3, 119, 85693 | bower, git, javascript | <h1>Configure bower to install only dist folder</h1>
<p>I am trying to learn tools such as bower/grunt/requirejs in order to speed up the development process for my website and to make my code more modularized/efficient. I am currently following <a href="http://code.tutsplus.com/tutorials/a-requirejs-backbone-and-bow... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 20,110 | git | # Configure bower to install only dist folder
I am trying to learn tools such as bower/grunt/requirejs in order to speed up the development process for my website and to make my code more modularized/efficient. I am currently following [this tutorial](http://code.tutsplus.com/tutorials/a-requirejs-backbone-and-bower-s... | What you're looking for is the *ignore* property in `bower.json`: <https://github.com/bower/bower.json-spec>
The developer of the module can use the *ignore* attribute to exclude files when the module is downloaded and installed through Bower.
If you are the developer of said module, you can use the *ignore* attribut... |
1380333 | Highlighting added/deleted lines, ignoring moves, in a patch file | 25 | 2009-09-04 16:39:40 | <p>I'm reviewing a patch that moved a <em>lot</em> of things around, added a few things, and removed a few things. I'm wondering if anyone's written a utility for picking out the unique adds/removes in a universal diff?</p>
<p>That is, an add and a remove of the same line should cancel themselves out.</p>
<p>Obvious... | 7,004 | 124,497 | 2023-11-14 11:55:27 | 1,400,664 | 22 | 2009-09-09 16:19:44 | 124,497 | 2009-09-09 16:19:44 | https://stackoverflow.com/q/1380333 | https://stackoverflow.com/a/1400664 | <p>This is what I ended up using.</p>
<p>Example usage:</p>
<p><code>git diff -w | /path/to/ignore_moves.py | less -R</code></p>
<h2>ignore_moves.py</h2>
<pre><code>#!/usr/bin/python
import sys
from itertoo... | <p>This is what I ended up using.</p> <p>Example usage:</p> <p><code>git diff -w | /path/to/ignore_moves.py | less -R</code></p> <h2>ignore_moves.py</h2> <pre><code>#!/usr/bin/python import sys from itertoo... | 119, 606 | diff, git | <h1>Highlighting added/deleted lines, ignoring moves, in a patch file</h1>
<p>I'm reviewing a patch that moved a <em>lot</em> of things around, added a few things, and removed a few things. I'm wondering if anyone's written a utility for picking out the unique adds/removes in a universal diff?</p>
<p>That is, an add ... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 20,113 | git | # Highlighting added/deleted lines, ignoring moves, in a patch file
I'm reviewing a patch that moved a *lot* of things around, added a few things, and removed a few things. I'm wondering if anyone's written a utility for picking out the unique adds/removes in a universal diff?
That is, an add and a remove of the same... | This is what I ended up using.
Example usage:
`git diff -w | /path/to/ignore_moves.py | less -R`
## ignore_moves.py
```
#!/usr/bin/python
import sys
from itertools import *
RED = 31
GREEN = 32
RESET_SEQ =... |
40095142 | How do I reset the working tree without moving HEAD? | 24 | 2016-10-17 20:31:24 | <p>Given a git branch with some commits on it (C is the most recent commit):</p>
<pre><code>A -> B -> C
</code></pre>
<p>How do I reset my workspace so that all the files are in the state they were at commit B, but HEAD is still at C?</p>
<p>I've looked at <code>git-reset</code>, but none of the options seem t... | 5,437 | 509,706 | 2024-03-01 15:05:08 | 40,095,376 | 22 | 2016-10-17 20:45:46 | 1,535,516 | 2024-03-01 15:05:08 | https://stackoverflow.com/q/40095142 | https://stackoverflow.com/a/40095376 | <blockquote>
<p><code>git checkout [-p|--patch] [<tree-ish>] [--] <pathspec>...</code></p>
<p><code>git checkout with <paths></code> or <code>--patch</code> is used to restore modified or deleted paths to their original contents from the index or replace paths with the contents from a named <code><... | <blockquote> <p><code>git checkout [-p|--patch] [<tree-ish>] [--] <pathspec>...</code></p> <p><code>git checkout with <paths></code> or <code>--patch</code> is used to restore modified or deleted paths to their original contents from the index or replace paths with the contents from a named <code><... | 119 | git | <h1>How do I reset the working tree without moving HEAD?</h1>
<p>Given a git branch with some commits on it (C is the most recent commit):</p>
<pre><code>A -> B -> C
</code></pre>
<p>How do I reset my workspace so that all the files are in the state they were at commit B, but HEAD is still at C?</p>
<p>I've lo... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 20,114 | git | # How do I reset the working tree without moving HEAD?
Given a git branch with some commits on it (C is the most recent commit):
```
A -> B -> C
```
How do I reset my workspace so that all the files are in the state they were at commit B, but HEAD is still at C?
I've looked at `git-reset`, but none of the options s... | > `git checkout [-p|--patch] [<tree-ish>] [--] <pathspec>...`
>
> `git checkout with <paths>` or `--patch` is used to restore modified or deleted paths to their original contents from the index or replace paths with the contents from a named `<tree-ish>` (most often a commit-ish).
So you need to run this at root of yo... |
39665570 | Why can two git worktrees not check out the same branch? | 24 | 2016-09-23 16:32:04 | <p>Using a separate <a href="https://git-scm.com/docs/git-worktree" rel="noreferrer">git-worktree</a>, why can I not check out the same branch as in the main working copy? If I try, I get the error:</p>
<pre><code>fatal: 'mybranch' is already checked out at '/path/to/repo'
</code></pre>
<p>I can see that if I check i... | 7,682 | 746,346 | 2016-09-23 19:49:51 | 39,668,520 | 22 | 2016-09-23 19:49:51 | 1,256,452 | 2016-09-23 19:49:51 | https://stackoverflow.com/q/39665570 | https://stackoverflow.com/a/39668520 | <blockquote>
<p>I can see that if I check in from one worktree, the other would end up in a detached HEAD state</p>
</blockquote>
<p>Actually, it <em>wouldn't</em>, and that's the problem!</p>
<p>Each work-tree has its own <code>HEAD</code>, and its own index (aka staging-area or cache). All share the actual under... | <blockquote> <p>I can see that if I check in from one worktree, the other would end up in a detached HEAD state</p> </blockquote> <p>Actually, it <em>wouldn't</em>, and that's the problem!</p> <p>Each work-tree has its own <code>HEAD</code>, and its own index (aka staging-area or cache). All share the actual under... | 119, 117020 | git, git-worktree | <h1>Why can two git worktrees not check out the same branch?</h1>
<p>Using a separate <a href="https://git-scm.com/docs/git-worktree" rel="noreferrer">git-worktree</a>, why can I not check out the same branch as in the main working copy? If I try, I get the error:</p>
<pre><code>fatal: 'mybranch' is already checked ou... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 20,115 | git | # Why can two git worktrees not check out the same branch?
Using a separate [git-worktree](https://git-scm.com/docs/git-worktree), why can I not check out the same branch as in the main working copy? If I try, I get the error:
```
fatal: 'mybranch' is already checked out at '/path/to/repo'
```
I can see that if I ch... | > I can see that if I check in from one worktree, the other would end up in a detached HEAD state
Actually, it *wouldn't*, and that's the problem!
Each work-tree has its own `HEAD`, and its own index (aka staging-area or cache). All share the actual underlying repository, and the underlying branch tip files such as `... |
6702821 | Git Commit Generation Numbers | 24 | 2011-07-15 04:53:34 | <p>What are git commit generation numbers (<a href="http://news.ycombinator.com/item?id=2765844">hacker news link</a>) and what are their significance?</p>
| 4,181 | 7,965 | 2013-05-21 18:33:18 | 6,708,132 | 22 | 2011-07-15 14:00:38 | 6,309 | 2013-05-21 18:33:18 | https://stackoverflow.com/q/6702821 | https://stackoverflow.com/a/6708132 | <p>Just to add to <a href="https://stackoverflow.com/users/7965/siri">siri</a>'s <a href="https://stackoverflow.com/questions/6702821/git-commit-generation-numbers/6702843#6702843">answer</a>, "Commit Generation Numbers" are:</p>
<ul>
<li><a href="http://www.spinics.net/lists/git/msg161165.html" rel="nofollow noreferr... | <p>Just to add to <a href="https://stackoverflow.com/users/7965/siri">siri</a>'s <a href="https://stackoverflow.com/questions/6702821/git-commit-generation-numbers/6702843#6702843">answer</a>, "Commit Generation Numbers" are:</p> <ul> <li><a href="http://www.spinics.net/lists/git/msg161165.html" rel="nofollow noreferr... | 119, 5597 | commit, git | <h1>Git Commit Generation Numbers</h1>
<p>What are git commit generation numbers (<a href="http://news.ycombinator.com/item?id=2765844">hacker news link</a>) and what are their significance?</p>
| q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 20,116 | git | # Git Commit Generation Numbers
What are git commit generation numbers ([hacker news link](http://news.ycombinator.com/item?id=2765844)) and what are their significance? | Just to add to [siri](https://stackoverflow.com/users/7965/siri)'s [answer](https://stackoverflow.com/questions/6702821/git-commit-generation-numbers/6702843#6702843), "Commit Generation Numbers" are:
- [explained here](http://www.spinics.net/lists/git/msg161165.html):
> A commit's generation is its **height in the h... |
1681762 | How to handle xml/html in git feature branch workflow? | 23 | 2009-11-05 16:25:12 | <p>Our project is working within fairly close quarters code-wise (a lot of changes happening in parallel in a fairly small geographical area of the code), and our feature branch based git workflow works out really nice for our java code. </p>
<p>But the xml/html stuff is not working really well. Simple unrelated chang... | 12,633 | 23,691 | 2018-12-18 18:16:42 | 1,690,981 | 22 | 2009-11-06 22:37:40 | 46,058 | 2009-11-06 22:37:40 | https://stackoverflow.com/q/1681762 | https://stackoverflow.com/a/1690981 | <p>Git allows for <strong>custom merge drivers</strong>, selected via <a href="http://git-scm.com/docs/gitattributes" rel="noreferrer">gitattributes</a> per path (e.g. for all <code>*.xml</code> files).</p>
<p>What you need to find is a XML-aware merge driver, plus possibly also write a simple script to transform betw... | <p>Git allows for <strong>custom merge drivers</strong>, selected via <a href="http://git-scm.com/docs/gitattributes" rel="noreferrer">gitattributes</a> per path (e.g. for all <code>*.xml</code> files).</p> <p>What you need to find is a XML-aware merge driver, plus possibly also write a simple script to transform betw... | 2, 19, 119, 717 | git, html, merge, xml | <h1>How to handle xml/html in git feature branch workflow?</h1>
<p>Our project is working within fairly close quarters code-wise (a lot of changes happening in parallel in a fairly small geographical area of the code), and our feature branch based git workflow works out really nice for our java code. </p>
<p>But the x... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 20,118 | git | # How to handle xml/html in git feature branch workflow?
Our project is working within fairly close quarters code-wise (a lot of changes happening in parallel in a fairly small geographical area of the code), and our feature branch based git workflow works out really nice for our java code.
But the xml/html stuff is ... | Git allows for **custom merge drivers**, selected via [gitattributes](http://git-scm.com/docs/gitattributes) per path (e.g. for all `*.xml` files).
What you need to find is a XML-aware merge driver, plus possibly also write a simple script to transform between Git conventions and said merge driver conventions. There i... |
14169130 | Difference between git branch --set-upstream-to vs git remote add origin | 22 | 2013-01-05 05:59:24 | <p>I find it little confusing to know the difference between <code>git branch --set-upstream-to</code> vs <code>git remote add origin</code> or even <code>git remote add upstream</code></p>
<p>Basically I have a bare repository created with <code>git init --bare</code> which is shared on network so that other develope... | 19,078 | 1,950,456 | 2020-02-29 06:42:24 | 14,169,183 | 22 | 2013-01-05 06:09:22 | 413,399 | 2013-01-05 06:09:22 | https://stackoverflow.com/q/14169130 | https://stackoverflow.com/a/14169183 | <p><code>git remote add</code> creates a remote, which is a shorthand name for another repository. <code>git branch --set-upstream-to</code> sets a branch to be tracked by the branch in the remote repository specified. </p>
<p>What you are wanting to do is track a remote branch, which is done with <code>git branch --... | <p><code>git remote add</code> creates a remote, which is a shorthand name for another repository. <code>git branch --set-upstream-to</code> sets a branch to be tracked by the branch in the remote repository specified. </p> <p>What you are wanting to do is track a remote branch, which is done with <code>git branch --... | 81, 119, 456 | git, version-control, versioning | <h1>Difference between git branch --set-upstream-to vs git remote add origin</h1>
<p>I find it little confusing to know the difference between <code>git branch --set-upstream-to</code> vs <code>git remote add origin</code> or even <code>git remote add upstream</code></p>
<p>Basically I have a bare repository created w... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 20,121 | git | # Difference between git branch --set-upstream-to vs git remote add origin
I find it little confusing to know the difference between `git branch --set-upstream-to` vs `git remote add origin` or even `git remote add upstream`
Basically I have a bare repository created with `git init --bare` which is shared on network ... | `git remote add` creates a remote, which is a shorthand name for another repository. `git branch --set-upstream-to` sets a branch to be tracked by the branch in the remote repository specified.
What you are wanting to do is track a remote branch, which is done with `git branch --set-upstream-to` or more simply `git br... |
66373656 | How can I modify remote history with 'git filter-repo'? | 21 | 2021-02-25 17:37:49 | <p>In the past I've used <a href="https://rtyley.github.io/bfg-repo-cleaner/" rel="nofollow noreferrer"><code>git filter-branch</code></a> to remove files from my Git history. Following that, I can do a force push to update the remote repository. For example, removing all HTML files from the local repository and then r... | 13,953 | 13,400,491 | 2024-10-26 01:49:59 | 66,378,209 | 22 | 2021-02-25 23:56:03 | 1,256,452 | 2021-02-25 23:56:03 | https://stackoverflow.com/q/66373656 | https://stackoverflow.com/a/66378209 | <blockquote>
<p>Why does git-filter-repo remove my remote?</p>
</blockquote>
<p><a href="https://htmlpreview.github.io/?https://github.com/newren/git-filter-repo/blob/docs/html/git-filter-repo.html" rel="noreferrer">The documentation</a> explains their reasoning, in the section titled <a href="https://htmlpreview.githu... | <blockquote> <p>Why does git-filter-repo remove my remote?</p> </blockquote> <p><a href="https://htmlpreview.github.io/?https://github.com/newren/git-filter-repo/blob/docs/html/git-filter-repo.html" rel="noreferrer">The documentation</a> explains their reasoning, in the section titled <a href="https://htmlpreview.githu... | 119, 46509, 141715 | git, git-filter-branch, git-filter-repo | <h1>How can I modify remote history with 'git filter-repo'?</h1>
<p>In the past I've used <a href="https://rtyley.github.io/bfg-repo-cleaner/" rel="nofollow noreferrer"><code>git filter-branch</code></a> to remove files from my Git history. Following that, I can do a force push to update the remote repository. For exam... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 20,123 | git | # How can I modify remote history with 'git filter-repo'?
In the past I've used [`git filter-branch`](https://rtyley.github.io/bfg-repo-cleaner/) to remove files from my Git history. Following that, I can do a force push to update the remote repository. For example, removing all HTML files from the local repository an... | > Why does git-filter-repo remove my remote?
[The documentation](https://htmlpreview.github.io/?https://github.com/newren/git-filter-repo/blob/docs/html/git-filter-repo.html) explains their reasoning, in the section titled [INTERNALS](https://htmlpreview.github.io/?https://github.com/newren/git-filter-repo/blob/docs/h... |
26492303 | What does peel mean in Git? | 21 | 2014-10-21 17:06:06 | <p>In trying to understand <a href="https://stackoverflow.com/questions/7501646/jgit-retrieve-tag-associated-with-a-git-commit">JGit: Retrieve tag associated with a git commit</a>, I arrived at this thread on the JGit mailing list:
<a href="http://dev.eclipse.org/mhonarc/lists/jgit-dev/msg01706.html" rel="noreferrer">[... | 4,865 | 231,573 | 2024-10-03 17:07:23 | 26,492,602 | 22 | 2014-10-21 17:23:27 | 1,256,452 | 2014-10-21 23:44:46 | https://stackoverflow.com/q/26492303 | https://stackoverflow.com/a/26492602 | <p>You already know that each object in a repository has a unique SHA-1, and also an associated type and contents. (From the command line, use <code>git cat-file -t <em>sha1</em></code> to see the type of the given object, and <code>git cat-file -p <em>sha1</em></code> to see the contents, possibly with some pretty-pr... | <p>You already know that each object in a repository has a unique SHA-1, and also an associated type and contents. (From the command line, use <code>git cat-file -t <em>sha1</em></code> to see the type of the given object, and <code>git cat-file -p <em>sha1</em></code> to see the contents, possibly with some pretty-pr... | 119, 3819 | git, terminology | <h1>What does peel mean in Git?</h1>
<p>In trying to understand <a href="https://stackoverflow.com/questions/7501646/jgit-retrieve-tag-associated-with-a-git-commit">JGit: Retrieve tag associated with a git commit</a>, I arrived at this thread on the JGit mailing list:
<a href="http://dev.eclipse.org/mhonarc/lists/jgit-... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 20,124 | git | # What does peel mean in Git?
In trying to understand [JGit: Retrieve tag associated with a git commit](https://stackoverflow.com/questions/7501646/jgit-retrieve-tag-associated-with-a-git-commit), I arrived at this thread on the JGit mailing list:
[[jgit-dev] Commits and tags](http://dev.eclipse.org/mhonarc/lists/jgit... | You already know that each object in a repository has a unique SHA-1, and also an associated type and contents. (From the command line, use `git cat-file -t sha1` to see the type of the given object, and `git cat-file -p sha1` to see the contents, possibly with some pretty-printing applied but generally fairly raw in f... |
24239737 | How to get the nth commit since the first commit? | 21 | 2014-06-16 08:46:54 | <p>I can find out how many commits there are with this:</p>
<pre><code>git rev-list HEAD --count
</code></pre>
<p>Let's say that returns 123 commits.</p>
<p>How can I find the nth commit out of 123? Note that I am not asking for the nth commit before HEAD. I would like to know the nth commit after the very first com... | 5,373 | 869,936 | 2014-06-16 09:07:28 | 24,239,999 | 22 | 2014-06-16 09:02:10 | 1,843,331 | 2014-06-16 09:07:28 | https://stackoverflow.com/q/24239737 | https://stackoverflow.com/a/24239999 | <p>This could be considered ugly but I could not think of a better way</p>
<pre><code>$git log --skip=N --max-count=1
</code></pre>
<p>This will show exactly 1 commit, counting back from HEAD by <code>N</code>. To use this you need to provide a number for <code>N</code> though. <code>N</code> is calculated with</p>
... | <p>This could be considered ugly but I could not think of a better way</p> <pre><code>$git log --skip=N --max-count=1 </code></pre> <p>This will show exactly 1 commit, counting back from HEAD by <code>N</code>. To use this you need to provide a number for <code>N</code> though. <code>N</code> is calculated with</p> ... | 119 | git | <h1>How to get the nth commit since the first commit?</h1>
<p>I can find out how many commits there are with this:</p>
<pre><code>git rev-list HEAD --count
</code></pre>
<p>Let's say that returns 123 commits.</p>
<p>How can I find the nth commit out of 123? Note that I am not asking for the nth commit before HEAD. I... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 20,125 | git | # How to get the nth commit since the first commit?
I can find out how many commits there are with this:
```
git rev-list HEAD --count
```
Let's say that returns 123 commits.
How can I find the nth commit out of 123? Note that I am not asking for the nth commit before HEAD. I would like to know the nth commit after... | This could be considered ugly but I could not think of a better way
```
$git log --skip=N --max-count=1
```
This will show exactly 1 commit, counting back from HEAD by `N`. To use this you need to provide a number for `N` though. `N` is calculated with
`N = total-commits - desired-commit-nr`
Say `git rev-list HEAD ... |
5226654 | How can I change a specific font color in git? | 21 | 2011-03-07 23:36:08 | <p>I'm looking to change the 'red' font color in git to something that is more towards pink. I tend to keep my monitors pretty dim, and whenever I look through diffs, the red font on the black background is hard to read. So, is there a way to specify that I want it to use a different color for red, preferably using a s... | 8,105 | 355,937 | 2023-04-30 01:17:17 | 5,226,740 | 22 | 2011-03-07 23:46:11 | 211,563 | 2023-04-30 01:17:17 | https://stackoverflow.com/q/5226654 | https://stackoverflow.com/a/5226740 | <pre><code>git config --global color.status.updated magenta
git config --global color.status.changed magenta
git config --global color.status.untracked magenta
git config --global color.diff.old magenta
</code></pre>
<p>Substitute ”magenta” for whatever color desired. See the <a href="https://git-scm.com/docs/git-confi... | <pre><code>git config --global color.status.updated magenta git config --global color.status.changed magenta git config --global color.status.untracked magenta git config --global color.diff.old magenta </code></pre> <p>Substitute ”magenta” for whatever color desired. See the <a href="https://git-scm.com/docs/git-confi... | 119, 21628, 27017 | git, mingw32, msysgit | <h1>How can I change a specific font color in git?</h1>
<p>I'm looking to change the 'red' font color in git to something that is more towards pink. I tend to keep my monitors pretty dim, and whenever I look through diffs, the red font on the black background is hard to read. So, is there a way to specify that I want i... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 20,126 | git | # How can I change a specific font color in git?
I'm looking to change the 'red' font color in git to something that is more towards pink. I tend to keep my monitors pretty dim, and whenever I look through diffs, the red font on the black background is hard to read. So, is there a way to specify that I want it to use ... | ```
git config --global color.status.updated magenta
git config --global color.status.changed magenta
git config --global color.status.untracked magenta
git config --global color.diff.old magenta
```
Substitute ”magenta” for whatever color desired. See the [`git-config` documentation](https://git-scm.com/docs/git-conf... |
19917025 | Why does Gerrit not include the change-id into merge commits? | 20 | 2013-11-11 22:14:31 | <p>so the git hook only puts change Id into commits. Although merge commits can be pushed to review branch even Gerrit is configured to require Change-Id in the commit messages. And when a merge commit has been pushed all the subsequent commit will depends on the merge commit - since there is no change Id. So what is t... | 6,383 | 1,342,413 | 2016-08-04 13:01:10 | 24,692,818 | 22 | 2014-07-11 07:59:29 | 1,127,485 | 2016-03-15 09:43:13 | https://stackoverflow.com/q/19917025 | https://stackoverflow.com/a/24692818 | <p>The underlying problem in Git is that <code>commit-msg</code> hooks are not called for merge commits without conflicts.</p>
<p>However, the <code>prepare-commit-msg</code> is called for (any) merge commits. So what I currently do to get Gerrit's <code>Change-Id</code> also added to merge commits without conflicts i... | <p>The underlying problem in Git is that <code>commit-msg</code> hooks are not called for merge commits without conflicts.</p> <p>However, the <code>prepare-commit-msg</code> is called for (any) merge commits. So what I currently do to get Gerrit's <code>Change-Id</code> also added to merge commits without conflicts i... | 119, 52272 | gerrit, git | <h1>Why does Gerrit not include the change-id into merge commits?</h1>
<p>so the git hook only puts change Id into commits. Although merge commits can be pushed to review branch even Gerrit is configured to require Change-Id in the commit messages. And when a merge commit has been pushed all the subsequent commit will ... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 20,129 | git | # Why does Gerrit not include the change-id into merge commits?
so the git hook only puts change Id into commits. Although merge commits can be pushed to review branch even Gerrit is configured to require Change-Id in the commit messages. And when a merge commit has been pushed all the subsequent commit will depends o... | The underlying problem in Git is that `commit-msg` hooks are not called for merge commits without conflicts.
However, the `prepare-commit-msg` is called for (any) merge commits. So what I currently do to get Gerrit's `Change-Id` also added to merge commits without conflicts is to use a `prepare-commit-msg` hook like t... |
21867407 | Difference in Git merge order? | 20 | 2014-02-18 23:02:52 | <p>Is there any difference between</p>
<pre><code>git merge c1 c2
</code></pre>
<p>and</p>
<pre><code>git merge c2 c1
</code></pre>
<p>? Also, is there any difference between</p>
<pre><code>git checkout c1
git merge c2
</code></pre>
<p>and</p>
<pre><code>git checkout c2
git merge c1
</code></pre>
<p>?</p>
| 9,345 | 1,748,450 | 2018-06-13 07:47:07 | 21,867,746 | 22 | 2014-02-18 23:25:31 | 641,955 | 2014-02-18 23:25:31 | https://stackoverflow.com/q/21867407 | https://stackoverflow.com/a/21867746 | <p>The end result in terms of the file content should be the same in all cases you described.</p>
<p>But there will be a difference in the <em>DAG</em>, in the ordering of commits in the graph of all commits, for example:</p>
<h3>Case 1: <code>git merge c1 c2</code></h3>
<pre><code>* dd24250 (HEAD, master) Merge b... | <p>The end result in terms of the file content should be the same in all cases you described.</p> <p>But there will be a difference in the <em>DAG</em>, in the ordering of commits in the graph of all commits, for example:</p> <h3>Case 1: <code>git merge c1 c2</code></h3> <pre><code>* dd24250 (HEAD, master) Merge b... | 119 | git | <h1>Difference in Git merge order?</h1>
<p>Is there any difference between</p>
<pre><code>git merge c1 c2
</code></pre>
<p>and</p>
<pre><code>git merge c2 c1
</code></pre>
<p>? Also, is there any difference between</p>
<pre><code>git checkout c1
git merge c2
</code></pre>
<p>and</p>
<pre><code>git checkout c2
gi... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 20,130 | git | # Difference in Git merge order?
Is there any difference between
```
git merge c1 c2
```
and
```
git merge c2 c1
```
? Also, is there any difference between
```
git checkout c1
git merge c2
```
and
```
git checkout c2
git merge c1
```
? | The end result in terms of the file content should be the same in all cases you described.
But there will be a difference in the *DAG*, in the ordering of commits in the graph of all commits, for example:
### Case 1: `git merge c1 c2`
```
* dd24250 (HEAD, master) Merge branches 'c1' and 'c2'
|\
| * 9d09bec (c2) ... |
16449029 | Is squashing commits into one best practice (for this particular workflow)? | 20 | 2013-05-08 19:49:40 | <p>I have the following <code>git</code> workflow:</p>
<ol>
<li>Create new feature branch</li>
<li>Work on feature branch</li>
<li>Commit often</li>
<li>Once feature is complete, merge into <code>master</code> branch</li>
<li>Rinse and repeat</li>
</ol>
<p>However, sometimes, I have the need to revert a whole feature... | 10,896 | 401,393 | 2013-05-08 21:59:22 | 16,450,924 | 22 | 2013-05-08 21:59:22 | 380,757 | 2013-05-08 21:59:22 | https://stackoverflow.com/q/16449029 | https://stackoverflow.com/a/16450924 | <p>You should look at leveraging the squash merge capability of git i.e. <code>git merge --squash</code>, so that you do not rewrite history unnecessarily.</p>
<p>Both <code>git merge --squash</code> and <code>git rebase --interactive</code> can be used to produce a squashed commit with the same resultant work-tree, b... | <p>You should look at leveraging the squash merge capability of git i.e. <code>git merge --squash</code>, so that you do not rewrite history unnecessarily.</p> <p>Both <code>git merge --squash</code> and <code>git rebase --interactive</code> can be used to produce a squashed commit with the same resultant work-tree, b... | 119, 758, 42532, 53850 | git, git-commit, squash, workflow | <h1>Is squashing commits into one best practice (for this particular workflow)?</h1>
<p>I have the following <code>git</code> workflow:</p>
<ol>
<li>Create new feature branch</li>
<li>Work on feature branch</li>
<li>Commit often</li>
<li>Once feature is complete, merge into <code>master</code> branch</li>
<li>Rinse an... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 20,131 | git | # Is squashing commits into one best practice (for this particular workflow)?
I have the following `git` workflow:
1. Create new feature branch
2. Work on feature branch
3. Commit often
4. Once feature is complete, merge into `master` branch
5. Rinse and repeat
However, sometimes, I have the need to revert a whole f... | You should look at leveraging the squash merge capability of git i.e. `git merge --squash`, so that you do not rewrite history unnecessarily.
Both `git merge --squash` and `git rebase --interactive` can be used to produce a squashed commit with the same resultant work-tree, but they are intended to serve 2 totally dif... |
14593817 | How do I configure Araxis Merge for use with Git? | 20 | 2013-01-29 23:13:07 | <p>I understand that Araxis Merge is now a "fully supported" <code>mergetool</code> for Git, so that much of what I can find about configuring Git to use it is now out of date. In particular, Araxis Merge should work "out of the box" simply by executing</p>
<pre><code>git config --global merge.tool araxis
</code></pre... | 18,857 | 656,912 | 2019-03-12 03:32:22 | 14,693,804 | 22 | 2013-02-04 19:13:26 | 656,912 | 2014-02-25 23:29:01 | https://stackoverflow.com/q/14593817 | https://stackoverflow.com/a/14693804 | <p>Git now uses the Araxis <code>compare</code> utility directly, rather than <code>araxisgitdiff</code> and <code>araxisgitmerge</code>, so all that's needed is to set the <code>path</code> to</p>
<pre><code>/Applications/Araxis Merge.app/Contents/Utilities/compare
</code></pre>
<p>for example, by executing</p>
<pr... | <p>Git now uses the Araxis <code>compare</code> utility directly, rather than <code>araxisgitdiff</code> and <code>araxisgitmerge</code>, so all that's needed is to set the <code>path</code> to</p> <pre><code>/Applications/Araxis Merge.app/Contents/Utilities/compare </code></pre> <p>for example, by executing</p> <pr... | 28897, 32868 | git-config, git-merge | <h1>How do I configure Araxis Merge for use with Git?</h1>
<p>I understand that Araxis Merge is now a "fully supported" <code>mergetool</code> for Git, so that much of what I can find about configuring Git to use it is now out of date. In particular, Araxis Merge should work "out of the box" simply by executing</p>
<p... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 20,133 | git | # How do I configure Araxis Merge for use with Git?
I understand that Araxis Merge is now a "fully supported" `mergetool` for Git, so that much of what I can find about configuring Git to use it is now out of date. In particular, Araxis Merge should work "out of the box" simply by executing
```
git config --global me... | Git now uses the Araxis `compare` utility directly, rather than `araxisgitdiff` and `araxisgitmerge`, so all that's needed is to set the `path` to
```
/Applications/Araxis Merge.app/Contents/Utilities/compare
```
for example, by executing
```
git config --global mergetool.araxis.path '/Applications/Araxis Merge.app/... |
12954644 | How can I reconnect a git repository with a svn repository? | 20 | 2012-10-18 12:26:31 | <p>I used <code>git svn</code> to import an existing Subversion repo into git. I then pushed this to git repo on a git server. Over the last few months changes to the software have been made in both Subversion and git repositories. Unfortunately, my local copy with the links between svn and git has been deleted.</p>
<... | 5,039 | 152,347 | 2012-11-19 15:15:30 | 13,105,418 | 22 | 2012-10-28 00:38:48 | 1,065,967 | 2012-11-19 15:15:30 | https://stackoverflow.com/q/12954644 | https://stackoverflow.com/a/13105418 | <p>By default <code>git-svn</code> stores mapping between SVN revisions and Git commits in commit messages. Do you see these <code>git-svn-id</code> lines for older commits in your original Git repository? Here I mean that Git repository hosted on the Git server and <em>not</em> that one you've fetched from SVN recentl... | <p>By default <code>git-svn</code> stores mapping between SVN revisions and Git commits in commit messages. Do you see these <code>git-svn-id</code> lines for older commits in your original Git repository? Here I mean that Git repository hosted on the Git server and <em>not</em> that one you've fetched from SVN recentl... | 63, 119 | git, svn | <h1>How can I reconnect a git repository with a svn repository?</h1>
<p>I used <code>git svn</code> to import an existing Subversion repo into git. I then pushed this to git repo on a git server. Over the last few months changes to the software have been made in both Subversion and git repositories. Unfortunately, my l... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 20,134 | git | # How can I reconnect a git repository with a svn repository?
I used `git svn` to import an existing Subversion repo into git. I then pushed this to git repo on a git server. Over the last few months changes to the software have been made in both Subversion and git repositories. Unfortunately, my local copy with the l... | By default `git-svn` stores mapping between SVN revisions and Git commits in commit messages. Do you see these `git-svn-id` lines for older commits in your original Git repository? Here I mean that Git repository hosted on the Git server and *not* that one you've fetched from SVN recently.
If so, you actually didn't l... |
12469855 | Git - rebasing to a particular tag | 20 | 2012-09-18 03:06:11 | <p><em>(This seems like it should be very easy to do, yet I'm coming up empty on searches so far.)</em></p>
<p>I have a body of code from an upstream source, with various versions tagged in it on various branches.</p>
<p>I am working on my "develop" branch which was based on tag "v1.0". many versions have come out si... | 25,885 | 760,905 | 2012-09-18 03:14:41 | 12,469,904 | 22 | 2012-09-18 03:14:41 | 389,146 | 2012-09-18 03:14:41 | https://stackoverflow.com/q/12469855 | https://stackoverflow.com/a/12469904 | <p>You would use the following command:</p>
<pre><code>git rebase --onto v1.5 v1.0 develop
</code></pre>
<p>The <code>develop</code> part of the command must be a branch, but the other two can be whatever you want.</p>
| <p>You would use the following command:</p> <pre><code>git rebase --onto v1.5 v1.0 develop </code></pre> <p>The <code>develop</code> part of the command must be a branch, but the other two can be whatever you want.</p> | 119, 8974, 29934, 60718 | git, git-rebase, git-tag, rebase | <h1>Git - rebasing to a particular tag</h1>
<p><em>(This seems like it should be very easy to do, yet I'm coming up empty on searches so far.)</em></p>
<p>I have a body of code from an upstream source, with various versions tagged in it on various branches.</p>
<p>I am working on my "develop" branch which was based o... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 20,135 | git | # Git - rebasing to a particular tag
*(This seems like it should be very easy to do, yet I'm coming up empty on searches so far.)*
I have a body of code from an upstream source, with various versions tagged in it on various branches.
I am working on my "develop" branch which was based on tag "v1.0". many versions ha... | You would use the following command:
```
git rebase --onto v1.5 v1.0 develop
```
The `develop` part of the command must be a branch, but the other two can be whatever you want. |
3365933 | Getting Beyond Compare to Diff 2 Branches Simultaneously | 20 | 2010-07-29 18:45:24 | <p><code>>>git difftool branch1 branch2</code> opens my difftool (Beyond Compare:BC) with every file that has a diff between the branches.
I have to close BC after each file just for it to reopen with the next file.</p>
<p>BC can diff whole directories and multiple files.</p>
<p>Is there a way to get <code>git... | 12,485 | 135,862 | 2017-08-02 06:22:11 | 6,117,120 | 22 | 2011-05-24 21:26:39 | 258,689 | 2012-06-20 12:30:30 | https://stackoverflow.com/q/3365933 | https://stackoverflow.com/a/6117120 | <p>Starting with git v1.7.11, you can use <a href="http://git-scm.com/docs/git-difftool.html" rel="noreferrer"><code>git difftool --dir-diff</code></a> to perform a directory diff.</p>
<p>The answer that follows applies to git installations older than v1.7.11.</p>
<hr>
<p>This issue is not related to BC, but to the ... | <p>Starting with git v1.7.11, you can use <a href="http://git-scm.com/docs/git-difftool.html" rel="noreferrer"><code>git difftool --dir-diff</code></a> to perform a directory diff.</p> <p>The answer that follows applies to git installations older than v1.7.11.</p> <hr> <p>This issue is not related to BC, but to the ... | 119, 1879, 15129, 33608 | beyondcompare, branch, difftool, git | <h1>Getting Beyond Compare to Diff 2 Branches Simultaneously</h1>
<p><code>>>git difftool branch1 branch2</code> opens my difftool (Beyond Compare:BC) with every file that has a diff between the branches.
I have to close BC after each file just for it to reopen with the next file.</p>
<p>BC can diff whole direc... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 20,136 | git | # Getting Beyond Compare to Diff 2 Branches Simultaneously
`>>git difftool branch1 branch2` opens my difftool (Beyond Compare:BC) with every file that has a diff between the branches.
I have to close BC after each file just for it to reopen with the next file.
BC can diff whole directories and multiple files.
Is the... | Starting with git v1.7.11, you can use [`git difftool --dir-diff`](http://git-scm.com/docs/git-difftool.html) to perform a directory diff.
The answer that follows applies to git installations older than v1.7.11.
---
This issue is not related to BC, but to the way git works.
Fortunately, there is a solution at this U... |
3283670 | Have git rerere automatically mark files as resolved? | 20 | 2010-07-19 17:59:49 | <p>I'm using git rerere, and it is useful, but there is one problem: When it automatically resolves a file, it does not mark it as resolved (eg with git add). So if I run 'git mergetool', it opens up the file as if it still has all the conflicts in it. </p>
<p>So far, I've made a small shell script which I can call, w... | 2,239 | 14,569 | 2022-09-06 12:57:17 | 3,284,288 | 22 | 2010-07-19 19:24:00 | 6,309 | 2022-09-06 12:57:17 | https://stackoverflow.com/q/3283670 | https://stackoverflow.com/a/3284288 | <p>Maybe a <a href="http://ftp.ntu.edu.tw/ftp/software/scm/git/docs/git-config.html" rel="nofollow noreferrer"><code>git config</code></a> setting can help:</p>
<pre><code>rerere.autoupdate
</code></pre>
<blockquote>
<p>When set to true, <a href="http://www.kernel.org/pub/software/scm/git/docs/git-rerere.html" rel="nof... | <p>Maybe a <a href="http://ftp.ntu.edu.tw/ftp/software/scm/git/docs/git-config.html" rel="nofollow noreferrer"><code>git config</code></a> setting can help:</p> <pre><code>rerere.autoupdate </code></pre> <blockquote> <p>When set to true, <a href="http://www.kernel.org/pub/software/scm/git/docs/git-rerere.html" rel="nof... | 119, 717, 3146, 83367 | conflict, git, git-rerere, merge | <h1>Have git rerere automatically mark files as resolved?</h1>
<p>I'm using git rerere, and it is useful, but there is one problem: When it automatically resolves a file, it does not mark it as resolved (eg with git add). So if I run 'git mergetool', it opens up the file as if it still has all the conflicts in it. </p>... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 20,137 | git | # Have git rerere automatically mark files as resolved?
I'm using git rerere, and it is useful, but there is one problem: When it automatically resolves a file, it does not mark it as resolved (eg with git add). So if I run 'git mergetool', it opens up the file as if it still has all the conflicts in it.
So far, I've... | Maybe a [`git config`](http://ftp.ntu.edu.tw/ftp/software/scm/git/docs/git-config.html) setting can help:
```
rerere.autoupdate
```
> When set to true, [`git-rerere`](http://www.kernel.org/pub/software/scm/git/docs/git-rerere.html) updates the index with the resulting contents after it cleanly resolves conflicts usin... |
2282952 | git: how to see changes due to push? | 20 | 2010-02-17 17:32:29 | <p>I can't quite figure out how to see what exactly was changed, in the remote repository, by a 'push'. 'git log' shows me the series of commits but those took place in my local repository and were pushed at different times; I would like to know which commits were part of each specific 'push'</p>
| 19,971 | 234,784 | 2010-02-17 18:52:44 | 2,283,501 | 22 | 2010-02-17 18:52:44 | 825 | 2010-02-17 18:52:44 | https://stackoverflow.com/q/2282952 | https://stackoverflow.com/a/2283501 | <p>Actually, you can fish this information out of the reflog. It's not the full history of the remote repository but rather it's the history of your copy of the remote repository's branch. So, you will not see changes that were made to the remote repository by other people. It's not pretty, but you can probably writ... | <p>Actually, you can fish this information out of the reflog. It's not the full history of the remote repository but rather it's the history of your copy of the remote repository's branch. So, you will not see changes that were made to the remote repository by other people. It's not pretty, but you can probably writ... | 119, 28898, 47913 | git, git-log, git-push | <h1>git: how to see changes due to push?</h1>
<p>I can't quite figure out how to see what exactly was changed, in the remote repository, by a 'push'. 'git log' shows me the series of commits but those took place in my local repository and were pushed at different times; I would like to know which commits were part of ... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 20,138 | git | # git: how to see changes due to push?
I can't quite figure out how to see what exactly was changed, in the remote repository, by a 'push'. 'git log' shows me the series of commits but those took place in my local repository and were pushed at different times; I would like to know which commits were part of each speci... | Actually, you can fish this information out of the reflog. It's not the full history of the remote repository but rather it's the history of your copy of the remote repository's branch. So, you will not see changes that were made to the remote repository by other people. It's not pretty, but you can probably write a sc... |
48640809 | Force push a git lfs file ID | 19 | 2018-02-06 10:30:36 | <p>Using git lfs, how can I force push a file ID that I know I have locally but that for some reason did not get pushed to the server ?</p>
<p>ie, on my build system I have errors like </p>
<blockquote>
<p>Git LFS: (0 of 15 files, 1 skipped) 0 B / 1.10 MB, 4.30 MB skippedGit LFS: (15 of 15 files, 1 skipped) 1.10 MB... | 11,674 | 2,832,282 | 2021-11-29 13:17:13 | 48,640,866 | 22 | 2018-02-06 10:33:18 | 2,832,282 | 2021-11-29 13:17:13 | https://stackoverflow.com/q/48640809 | https://stackoverflow.com/a/48640866 | <p>I managed to trigger some extra documentation somehow.... the syntax is actually</p>
<pre class="lang-sh prettyprint-override"><code>git lfs push origin --object-id [ID]
</code></pre>
<p>And it will force sync an object that a simple <code>git lfs push</code> would not</p>
| <p>I managed to trigger some extra documentation somehow.... the syntax is actually</p> <pre class="lang-sh prettyprint-override"><code>git lfs push origin --object-id [ID] </code></pre> <p>And it will force sync an object that a simple <code>git lfs push</code> would not</p> | 119, 115244 | git, git-lfs | <h1>Force push a git lfs file ID</h1>
<p>Using git lfs, how can I force push a file ID that I know I have locally but that for some reason did not get pushed to the server ?</p>
<p>ie, on my build system I have errors like </p>
<blockquote>
<p>Git LFS: (0 of 15 files, 1 skipped) 0 B / 1.10 MB, 4.30 MB skippedGit LF... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 20,140 | git | # Force push a git lfs file ID
Using git lfs, how can I force push a file ID that I know I have locally but that for some reason did not get pushed to the server ?
ie, on my build system I have errors like
> Git LFS: (0 of 15 files, 1 skipped) 0 B / 1.10 MB, 4.30 MB skippedGit LFS: (15 of 15 files, 1 skipped) 1.10 M... | I managed to trigger some extra documentation somehow.... the syntax is actually
```
git lfs push origin --object-id [ID]
```
And it will force sync an object that a simple `git lfs push` would not |
26115157 | Is commit needed after resolving merge conflict during Git rebase? | 19 | 2014-09-30 07:30:49 | <p>I rebase another branch onto my checkout branch and I get a conflict during rebase. i resolved the merge conflict.</p>
<pre><code>$ git status
rebase in progress; onto 77c951b
You are currently rebasing branch 'test' on '77c951b'.
(all conflicts fixed: run "git rebase --continue")
Changes to be committed:
(use... | 10,695 | 183,704 | 2019-09-18 15:58:16 | 46,240,475 | 22 | 2017-09-15 13:13:41 | 456,809 | 2017-09-15 13:13:41 | https://stackoverflow.com/q/26115157 | https://stackoverflow.com/a/46240475 | <p>Some good answers here but to answer the question. <strong>NO</strong> you do not <em>need</em> to commit after resolving the merge conflict.</p>
<p>Once you have added the resolution to the git staging area via <code>git add <file></code> a <code>git rebase --continue</code> will <em>make the commit for you ... | <p>Some good answers here but to answer the question. <strong>NO</strong> you do not <em>need</em> to commit after resolving the merge conflict.</p> <p>Once you have added the resolution to the git staging area via <code>git add <file></code> a <code>git rebase --continue</code> will <em>make the commit for you ... | 119, 28897, 29934, 76220 | git, git-branch, git-merge, git-rebase | <h1>Is commit needed after resolving merge conflict during Git rebase?</h1>
<p>I rebase another branch onto my checkout branch and I get a conflict during rebase. i resolved the merge conflict.</p>
<pre><code>$ git status
rebase in progress; onto 77c951b
You are currently rebasing branch 'test' on '77c951b'.
(all co... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 20,141 | git | # Is commit needed after resolving merge conflict during Git rebase?
I rebase another branch onto my checkout branch and I get a conflict during rebase. i resolved the merge conflict.
```
$ git status
rebase in progress; onto 77c951b
You are currently rebasing branch 'test' on '77c951b'.
(all conflicts fixed: run "... | Some good answers here but to answer the question. **NO** you do not *need* to commit after resolving the merge conflict.
Once you have added the resolution to the git staging area via `git add <file>` a `git rebase --continue` will *make the commit for you using the original commit message*.
**NOTE** the commit hash... |
21599474 | How to git grep only a set of file extensions | 19 | 2014-02-06 09:59:16 | <p>How do you perform a git grep and limit the files checked to a set of files. I would like to be able to grep the contents of .cpp and .h files looking for MyFunc. eg:</p>
<pre><code>git grep "MyFunc" -- *.[hc]*
</code></pre>
<p>However this also matches, .c files and .cs files.</p>
| 7,751 | 346,188 | 2017-12-16 03:23:33 | 33,186,697 | 22 | 2015-10-17 12:36:50 | 691,281 | 2015-10-17 12:36:50 | https://stackoverflow.com/q/21599474 | https://stackoverflow.com/a/33186697 | <p>Use:</p>
<pre><code>git grep "MyFunc" -- '*.cpp' '*.h'
</code></pre>
<p>The quotes are necessary so that git expands the wildcards rather than the shell. If you omit them, it'll only search files in the current directory, rather than including subdirectories.</p>
| <p>Use:</p> <pre><code>git grep "MyFunc" -- '*.cpp' '*.h' </code></pre> <p>The quotes are necessary so that git expands the wildcards rather than the shell. If you omit them, it'll only search files in the current directory, rather than including subdirectories.</p> | 119, 1271, 1280 | file-extension, git, grep | <h1>How to git grep only a set of file extensions</h1>
<p>How do you perform a git grep and limit the files checked to a set of files. I would like to be able to grep the contents of .cpp and .h files looking for MyFunc. eg:</p>
<pre><code>git grep "MyFunc" -- *.[hc]*
</code></pre>
<p>However this also matches, .c fi... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 20,142 | git | # How to git grep only a set of file extensions
How do you perform a git grep and limit the files checked to a set of files. I would like to be able to grep the contents of .cpp and .h files looking for MyFunc. eg:
```
git grep "MyFunc" -- *.[hc]*
```
However this also matches, .c files and .cs files. | Use:
```
git grep "MyFunc" -- '*.cpp' '*.h'
```
The quotes are necessary so that git expands the wildcards rather than the shell. If you omit them, it'll only search files in the current directory, rather than including subdirectories. |
11757672 | git: How to view commits to a single branch | 19 | 2012-08-01 10:51:09 | <p>A colleague created a local branch ('branchA') from master, did some work, pushed it, merged in master, did some more work and pushed it again. Concurrently, other colleagues have been working on other branches and merging them to master.</p>
<p>Now I need to pull branchA to review it. So I've done a <code>git pull... | 19,199 | 1,491,250 | 2012-08-01 11:30:26 | 11,758,115 | 22 | 2012-08-01 11:20:24 | 877,115 | 2012-08-01 11:26:41 | https://stackoverflow.com/q/11757672 | https://stackoverflow.com/a/11758115 | <p>The following applies to your second question, how to find the differences between <code>branchA</code> and your local's current version of <code>master</code>. You want to use 'double dot' syntax with <code>git log</code> to see all the commits in <code>branchA</code> that aren't in <code>master</code>. To wit:</p>... | <p>The following applies to your second question, how to find the differences between <code>branchA</code> and your local's current version of <code>master</code>. You want to use 'double dot' syntax with <code>git log</code> to see all the commits in <code>branchA</code> that aren't in <code>master</code>. To wit:</p>... | 119 | git | <h1>git: How to view commits to a single branch</h1>
<p>A colleague created a local branch ('branchA') from master, did some work, pushed it, merged in master, did some more work and pushed it again. Concurrently, other colleagues have been working on other branches and merging them to master.</p>
<p>Now I need to pul... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 20,143 | git | # git: How to view commits to a single branch
A colleague created a local branch ('branchA') from master, did some work, pushed it, merged in master, did some more work and pushed it again. Concurrently, other colleagues have been working on other branches and merging them to master.
Now I need to pull branchA to rev... | The following applies to your second question, how to find the differences between `branchA` and your local's current version of `master`. You want to use 'double dot' syntax with `git log` to see all the commits in `branchA` that aren't in `master`. To wit:
```
git log master..branchA
```
Per the `git log` man page:... |
6802928 | Why is there a staging process in git? | 19 | 2011-07-23 19:52:46 | <p>Why is there the staging area between "git add" and "git commit"?
I understand the concept, but fail to see the sense in adding files to the staging area before actually commiting. Why not skip this step?</p>
| 2,148 | 234,922 | 2020-04-26 15:14:50 | 6,802,939 | 22 | 2011-07-23 19:56:10 | 275,354 | 2013-07-21 03:56:04 | https://stackoverflow.com/q/6802928 | https://stackoverflow.com/a/6802939 | <p><a href="https://git.wiki.kernel.org/index.php/WhatIsTheIndex">The truth is: the index is a staging area. Every SCM has it, but git shows it to you, and uses it effectively.</a></p>
<p>One main reason is so you don't have to commit your entire working directory. You can move portions of it to the index and commit ... | <p><a href="https://git.wiki.kernel.org/index.php/WhatIsTheIndex">The truth is: the index is a staging area. Every SCM has it, but git shows it to you, and uses it effectively.</a></p> <p>One main reason is so you don't have to commit your entire working directory. You can move portions of it to the index and commit ... | 119 | git | <h1>Why is there a staging process in git?</h1>
<p>Why is there the staging area between "git add" and "git commit"?
I understand the concept, but fail to see the sense in adding files to the staging area before actually commiting. Why not skip this step?</p>
| q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 20,144 | git | # Why is there a staging process in git?
Why is there the staging area between "git add" and "git commit"?
I understand the concept, but fail to see the sense in adding files to the staging area before actually commiting. Why not skip this step? | [The truth is: the index is a staging area. Every SCM has it, but git shows it to you, and uses it effectively.](https://git.wiki.kernel.org/index.php/WhatIsTheIndex)
One main reason is so you don't have to commit your entire working directory. You can move portions of it to the index and commit just those.
For examp... |
28149804 | Difference between `git branch -f <branch_name> <hash>` and `git checkout <branch_name>; git reset --hard <hash>` under a clean working tree? | 18 | 2015-01-26 12:05:29 | <p>Up until now, I have always used <code>git checkout <branch_name>; git reset --hard <hash></code> to move a branch back to an earlier commit.</p>
<p>Then I came across <a href="https://stackoverflow.com/questions/5471174/git-move-branch-pointer-to-different-commit">this question</a>, but the answers and... | 4,112 | 391,161 | 2015-01-28 22:57:42 | 28,150,031 | 22 | 2015-01-26 12:21:12 | 26,396 | 2015-01-28 22:57:42 | https://stackoverflow.com/q/28149804 | https://stackoverflow.com/a/28150031 | <p>The main difference is that <code>git branch -f <branchname> <commitref></code> moves <code><branchname></code> to point the specified commit <em>without touching</em> <code>HEAD</code>, the <em>index</em> or the <em>working copy</em>, while <code>git checkout <branchname> && git rese... | <p>The main difference is that <code>git branch -f <branchname> <commitref></code> moves <code><branchname></code> to point the specified commit <em>without touching</em> <code>HEAD</code>, the <em>index</em> or the <em>working copy</em>, while <code>git checkout <branchname> && git rese... | 119, 1879, 37230 | branch, git, git-checkout | <h1>Difference between `git branch -f <branch_name> <hash>` and `git checkout <branch_name>; git reset --hard <hash>` under a clean working tree?</h1>
<p>Up until now, I have always used <code>git checkout <branch_name>; git reset --hard <hash></code> to move a branch back to an earlier commit.</p>
<p>Then... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 20,149 | git | # Difference between `git branch -f ` and `git checkout ; git reset --hard ` under a clean working tree?
Up until now, I have always used `git checkout <branch_name>; git reset --hard <hash>` to move a branch back to an earlier commit.
Then I came across [this question](https://stackoverflow.com/questions/5471174/git... | The main difference is that `git branch -f <branchname> <commitref>` moves `<branchname>` to point the specified commit *without touching* `HEAD`, the *index* or the *working copy*, while `git checkout <branchname> && git reset --hard <commitref>` modifies all three.
If you want to quickly rearrange branches without m... |
27036387 | git log not chronologically ordered | 18 | 2014-11-20 09:48:49 | <p>I found out unexpectedly on a public project (B2G aka FirefosOS) that git log output is not chronologically ordered :</p>
<pre><code>$ git clone https://git.mozilla.org/releases/gecko.git
$ git log --graph --format='%C(yellow)%h%Creset %cr %C(blue)%<(7,trunc)%cn%Creset -%C(auto)%d%Creset %<(80,trunc)%s' --all... | 5,707 | 4,273,672 | 2014-11-20 15:35:25 | 27,042,954 | 22 | 2014-11-20 15:12:34 | 1,157,054 | 2014-11-20 15:35:25 | https://stackoverflow.com/q/27036387 | https://stackoverflow.com/a/27042954 | <p>From <a href="http://git-scm.com/docs/git-log" rel="noreferrer">the documentation for git log</a>:</p>
<blockquote>
<p><strong>--graph</strong></p>
<p>Draw a text-based graphical representation of the commit history on the left hand side of the output. This may cause extra lines to be printed in between comm... | <p>From <a href="http://git-scm.com/docs/git-log" rel="noreferrer">the documentation for git log</a>:</p> <blockquote> <p><strong>--graph</strong></p> <p>Draw a text-based graphical representation of the commit history on the left hand side of the output. This may cause extra lines to be printed in between comm... | 119 | git | <h1>git log not chronologically ordered</h1>
<p>I found out unexpectedly on a public project (B2G aka FirefosOS) that git log output is not chronologically ordered :</p>
<pre><code>$ git clone https://git.mozilla.org/releases/gecko.git
$ git log --graph --format='%C(yellow)%h%Creset %cr %C(blue)%<(7,trunc)%cn%Crese... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 20,150 | git | # git log not chronologically ordered
I found out unexpectedly on a public project (B2G aka FirefosOS) that git log output is not chronologically ordered :
```
$ git clone https://git.mozilla.org/releases/gecko.git
$ git log --graph --format='%C(yellow)%h%Creset %cr %C(blue)%<(7,trunc)%cn%Creset -%C(auto)%d%Creset %<... | From [the documentation for git log](http://git-scm.com/docs/git-log):
> **--graph**
>
> Draw a text-based graphical representation of the commit history on the left hand side of the output. This may cause extra lines to be printed in between commits, in order for the graph history to be drawn properly.
>
> [...]
>
> ... |
8359277 | Git Show to different editor | 18 | 2011-12-02 16:16:18 | <p>I want the git show command to send the contents of the file to a different editor (e.g. Notepad++) instead of the default view.</p>
<p>I'm presuming this is possible by changing the git config but I'm not sure where.</p>
| 7,496 | 323,158 | 2020-05-11 04:18:03 | 8,360,614 | 22 | 2011-12-02 18:04:16 | 229,044 | 2011-12-02 18:10:08 | https://stackoverflow.com/q/8359277 | https://stackoverflow.com/a/8360614 | <p>Git is not invoking an <em>editor</em> when you <code>git show</code> something, it is invoking your <em>pager</em>, and the two serve completely different purposes.</p>
<p>The setting you're after is <code>core.pager</code>, and you can configure it with <code>git config --global core.pager <your editor here>... | <p>Git is not invoking an <em>editor</em> when you <code>git show</code> something, it is invoking your <em>pager</em>, and the two serve completely different purposes.</p> <p>The setting you're after is <code>core.pager</code>, and you can configure it with <code>git config --global core.pager <your editor here>... | 119 | git | <h1>Git Show to different editor</h1>
<p>I want the git show command to send the contents of the file to a different editor (e.g. Notepad++) instead of the default view.</p>
<p>I'm presuming this is possible by changing the git config but I'm not sure where.</p>
| q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 20,152 | git | # Git Show to different editor
I want the git show command to send the contents of the file to a different editor (e.g. Notepad++) instead of the default view.
I'm presuming this is possible by changing the git config but I'm not sure where. | Git is not invoking an *editor* when you `git show` something, it is invoking your *pager*, and the two serve completely different purposes.
The setting you're after is `core.pager`, and you can configure it with `git config --global core.pager <your editor here>`, but it won't help if your editor can't be configured ... |
4725389 | How to get started with Git on Mac | 18 | 2011-01-18 14:44:14 | <p>I installed Git on my Mac but I do not know how to run it or access it. From the terminal I type git but it says "command is invalid." </p>
<p>I downloaded git from <a href="http://code.google.com/p/git-osx-installer/downloads/list?can=3">http://code.google.com/p/git-osx-installer/downloads/list?can=3</a>
and I dow... | 66,862 | 567,391 | 2019-12-08 11:15:14 | 4,725,627 | 22 | 2011-01-18 15:04:54 | 95,592 | 2011-01-18 16:47:23 | https://stackoverflow.com/q/4725389 | https://stackoverflow.com/a/4725627 | <p>The git-osx-installer that you used should have installed git into <code>/usr/local/git</code>. See if you can <code>cd</code> into that directory. If you can, then check that your <code>PATH</code> was correctly set by running <code>echo $PATH</code> from the terminal and making sure that you see <code>/usr/local/g... | <p>The git-osx-installer that you used should have installed git into <code>/usr/local/git</code>. See if you can <code>cd</code> into that directory. If you can, then check that your <code>PATH</code> was correctly set by running <code>echo $PATH</code> from the terminal and making sure that you see <code>/usr/local/g... | 119, 369 | git, macos | <h1>How to get started with Git on Mac</h1>
<p>I installed Git on my Mac but I do not know how to run it or access it. From the terminal I type git but it says "command is invalid." </p>
<p>I downloaded git from <a href="http://code.google.com/p/git-osx-installer/downloads/list?can=3">http://code.google.com/p/git-osx-... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 20,153 | git | # How to get started with Git on Mac
I installed Git on my Mac but I do not know how to run it or access it. From the terminal I type git but it says "command is invalid."
I downloaded git from <http://code.google.com/p/git-osx-installer/downloads/list?can=3>
and I downloaded the package "Git Installer 1.7.3.5 - OS X... | The git-osx-installer that you used should have installed git into `/usr/local/git`. See if you can `cd` into that directory. If you can, then check that your `PATH` was correctly set by running `echo $PATH` from the terminal and making sure that you see `/usr/local/git/bin` in the included `PATH`. If not, you need to ... |
26891904 | Git - Make local HEAD the new master | 17 | 2014-11-12 16:34:37 | <p>I decided to go back a few commits because the path I followed was wrong. So I checked out <code>Added cordova to .gitignore</code> commit, and made some modifications. Like illustrated below : </p>
<p><img src="https://i.sstatic.net/WXoVh.png" alt="enter image description here"></p>
<p>Now when I <strong>push</s... | 21,693 | 1,399,416 | 2019-08-26 14:15:08 | 26,892,097 | 22 | 2014-11-12 16:45:20 | 503,402 | 2014-11-12 17:01:59 | https://stackoverflow.com/q/26891904 | https://stackoverflow.com/a/26892097 | <p>Even though you don't want that old branch anymore, git really doesn't like rewriting history or discarding changes. Just revert and merge.</p>
<pre><code>git branch new_master # name current detached HEAD
git checkout master # switch back to master
git revert --no-edit HEAD~4..HEAD # c... | <p>Even though you don't want that old branch anymore, git really doesn't like rewriting history or discarding changes. Just revert and merge.</p> <pre><code>git branch new_master # name current detached HEAD git checkout master # switch back to master git revert --no-edit HEAD~4..HEAD # c... | 119 | git | <h1>Git - Make local HEAD the new master</h1>
<p>I decided to go back a few commits because the path I followed was wrong. So I checked out <code>Added cordova to .gitignore</code> commit, and made some modifications. Like illustrated below : </p>
<p><img src="https://i.sstatic.net/WXoVh.png" alt="enter image descrip... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 20,156 | git | # Git - Make local HEAD the new master
I decided to go back a few commits because the path I followed was wrong. So I checked out `Added cordova to .gitignore` commit, and made some modifications. Like illustrated below :

Now when I **push** the new mo... | Even though you don't want that old branch anymore, git really doesn't like rewriting history or discarding changes. Just revert and merge.
```
git branch new_master # name current detached HEAD
git checkout master # switch back to master
git revert --no-edit HEAD~4..HEAD # create commits ... |
12785160 | Getting Git to follow renamed and edited files | 17 | 2012-10-08 15:52:30 | <p>Questions about renaming files in Git <a href="https://stackoverflow.com/questions/1430749/getting-git-to-acknowledge-previously-moved-files">have</a> <a href="https://stackoverflow.com/questions/2314652/is-it-possible-to-move-rename-files-in-git-and-maintain-their-history#comment2282717_2314757">been</a> <a href="h... | 11,590 | 613,540 | 2015-04-01 08:19:48 | 12,785,491 | 22 | 2012-10-08 16:16:22 | 729,881 | 2012-10-08 16:16:22 | https://stackoverflow.com/q/12785160 | https://stackoverflow.com/a/12785491 | <p>Git doesn't actually track renames in the repository, it uses a diff heuristic to determine if you renamed a file to another. That is to say, if you <code>git mv</code> a file and then replace the contents completely, it is <em>not</em> considered a rename, and you do <em>not</em> need to use <code>git mv</code> fo... | <p>Git doesn't actually track renames in the repository, it uses a diff heuristic to determine if you renamed a file to another. That is to say, if you <code>git mv</code> a file and then replace the contents completely, it is <em>not</em> considered a rename, and you do <em>not</em> need to use <code>git mv</code> fo... | 119, 456, 12895, 28897 | file-rename, git, git-merge, version-control | <h1>Getting Git to follow renamed and edited files</h1>
<p>Questions about renaming files in Git <a href="https://stackoverflow.com/questions/1430749/getting-git-to-acknowledge-previously-moved-files">have</a> <a href="https://stackoverflow.com/questions/2314652/is-it-possible-to-move-rename-files-in-git-and-maintain-t... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 20,158 | git | # Getting Git to follow renamed and edited files
Questions about renaming files in Git [have](https://stackoverflow.com/questions/1430749/getting-git-to-acknowledge-previously-moved-files) [been](https://stackoverflow.com/questions/2314652/is-it-possible-to-move-rename-files-in-git-and-maintain-their-history#comment22... | Git doesn't actually track renames in the repository, it uses a diff heuristic to determine if you renamed a file to another. That is to say, if you `git mv` a file and then replace the contents completely, it is *not* considered a rename, and you do *not* need to use `git mv` for it to detect renames.
For example:
`... |
786909 | Getting the whole files history with git-p4 | 17 | 2009-04-24 17:46:44 | <p>As I've mentioned in a <a href="https://stackoverflow.com/questions/783906/git-under-windows-msys-or-cygwin">previous question</a>, I'm looking into migrating our source control from Perforce to git.<br>
Looking around, I've found <a href="http://git.or.cz/gitwiki/InterfacesFrontendsAndTools#head-bb56c0cc211da9af169... | 12,179 | 82,682 | 2018-05-17 18:59:52 | 802,295 | 22 | 2009-04-29 13:08:48 | 85,134 | 2013-07-13 12:12:08 | https://stackoverflow.com/q/786909 | https://stackoverflow.com/a/802295 | <p>Try appending "@all" to the file path. For example, this produces a single-revision repo for me:</p>
<pre><code>python /usr/share/doc/git-core/contrib/fast-import/git-p4 clone --destination=master-pom \
//depot/services/master-pom/trunk/...
</code></pre>
<p>This command imported the full history:</p>
<pre><co... | <p>Try appending "@all" to the file path. For example, this produces a single-revision repo for me:</p> <pre><code>python /usr/share/doc/git-core/contrib/fast-import/git-p4 clone --destination=master-pom \ //depot/services/master-pom/trunk/... </code></pre> <p>This command imported the full history:</p> <pre><co... | 97, 119, 1286, 55021 | git, git-p4, migration, perforce | <h1>Getting the whole files history with git-p4</h1>
<p>As I've mentioned in a <a href="https://stackoverflow.com/questions/783906/git-under-windows-msys-or-cygwin">previous question</a>, I'm looking into migrating our source control from Perforce to git.<br>
Looking around, I've found <a href="http://git.or.cz/gitwiki... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 20,159 | git | # Getting the whole files history with git-p4
As I've mentioned in a [previous question](https://stackoverflow.com/questions/783906/git-under-windows-msys-or-cygwin), I'm looking into migrating our source control from Perforce to git.
Looking around, I've found [git-p4](http://git.or.cz/gitwiki/InterfacesFrontendsAn... | Try appending "@all" to the file path. For example, this produces a single-revision repo for me:
```
python /usr/share/doc/git-core/contrib/fast-import/git-p4 clone --destination=master-pom \
//depot/services/master-pom/trunk/...
```
This command imported the full history:
```
python /usr/share/doc/git-core/cont... |
36181006 | How to get the tree hash for a given directory name? | 16 | 2016-03-23 14:31:30 | <p>I'd like to attach a note to a tree object. However, in order to do so I first need to know the tree object's hash. For a given directory name that's part of my repository, how do I get its belonging tree object's hash in order to attach a note to it?</p>
<p>From reading <a href="https://stackoverflow.com/a/6011324... | 8,655 | 1,127,485 | 2023-06-25 22:00:47 | 52,656,910 | 22 | 2018-10-05 00:52:57 | 1,212,910 | 2018-10-05 00:52:57 | https://stackoverflow.com/q/36181006 | https://stackoverflow.com/a/52656910 | <p>You can do:</p>
<pre><code>git rev-parse HEAD:path/to/directory/in/my/git
</code></pre>
<p>To print only the hash. So you don't need <code>cut</code> or <code>awk</code> to extract it.</p>
| <p>You can do:</p> <pre><code>git rev-parse HEAD:path/to/directory/in/my/git </code></pre> <p>To print only the hash. So you don't need <code>cut</code> or <code>awk</code> to extract it.</p> | 119, 88239 | git, git-notes | <h1>How to get the tree hash for a given directory name?</h1>
<p>I'd like to attach a note to a tree object. However, in order to do so I first need to know the tree object's hash. For a given directory name that's part of my repository, how do I get its belonging tree object's hash in order to attach a note to it?</p>... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 20,161 | git | # How to get the tree hash for a given directory name?
I'd like to attach a note to a tree object. However, in order to do so I first need to know the tree object's hash. For a given directory name that's part of my repository, how do I get its belonging tree object's hash in order to attach a note to it?
From readin... | You can do:
```
git rev-parse HEAD:path/to/directory/in/my/git
```
To print only the hash. So you don't need `cut` or `awk` to extract it. |
36489841 | git log abbreviated format length | 16 | 2016-04-08 01:07:50 | <p>I would like to get the SHA number from from GIT log in abbreviated format. This command will work:</p>
<pre><code>git log -1 --format=%h
</code></pre>
<p>However, the default abbreviated format is 7 numbers in length.
Is there any way to change that?</p>
| 8,658 | 224,982 | 2021-08-30 14:56:38 | 36,490,029 | 22 | 2016-04-08 01:31:22 | 1,256,452 | 2021-08-30 14:56:38 | https://stackoverflow.com/q/36489841 | https://stackoverflow.com/a/36490029 | <p>For <code>git log</code>, the <code>--abbrev=<length></code> parameter controls how long the output for <code>%h</code> and other abbreviated hashes is:</p>
<pre><code>$ git log -1 --format=%h --abbrev=4
d157
</code></pre>
<p>I will also note that when using <code>-1</code> (or <code>--no-walk</code> which has... | <p>For <code>git log</code>, the <code>--abbrev=<length></code> parameter controls how long the output for <code>%h</code> and other abbreviated hashes is:</p> <pre><code>$ git log -1 --format=%h --abbrev=4 d157 </code></pre> <p>I will also note that when using <code>-1</code> (or <code>--no-walk</code> which has... | 119 | git | <h1>git log abbreviated format length</h1>
<p>I would like to get the SHA number from from GIT log in abbreviated format. This command will work:</p>
<pre><code>git log -1 --format=%h
</code></pre>
<p>However, the default abbreviated format is 7 numbers in length.
Is there any way to change that?</p>
| q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 20,162 | git | # git log abbreviated format length
I would like to get the SHA number from from GIT log in abbreviated format. This command will work:
```
git log -1 --format=%h
```
However, the default abbreviated format is 7 numbers in length.
Is there any way to change that? | For `git log`, the `--abbrev=<length>` parameter controls how long the output for `%h` and other abbreviated hashes is:
```
$ git log -1 --format=%h --abbrev=4
d157
```
I will also note that when using `-1` (or `--no-walk` which has the same effect in this particular case, but is more useful if you specify several co... |
33162263 | Merge no common commits into master branch? | 16 | 2015-10-16 03:50:09 | <p>I have a Git repo that has a lot of commits and separate code, say</p>
<pre><code>/Proj1
</code></pre>
<p>I also have another Git repo that has 1 commit in it that is not a common commit,</p>
<pre><code>/Proj2
</code></pre>
<p>How can I merge the two repos and have history show up correctly with parent commits? ... | 15,845 | 4,591,799 | 2015-10-16 14:55:55 | 33,173,575 | 22 | 2015-10-16 14:55:55 | 4,591,799 | 2015-10-16 14:55:55 | https://stackoverflow.com/q/33162263 | https://stackoverflow.com/a/33173575 | <p>Cupcake helped solve this one. Here's one way to do this: </p>
<p>In ProjA, add Proj B as a remote:</p>
<pre><code>git remote add projb C:\projB
</code></pre>
<p>Do a git fetch to grab all of the commits of projB's master branch:</p>
<pre><code>git fetch projb
</code></pre>
<p>Rebase starting from the root of p... | <p>Cupcake helped solve this one. Here's one way to do this: </p> <p>In ProjA, add Proj B as a remote:</p> <pre><code>git remote add projb C:\projB </code></pre> <p>Do a git fetch to grab all of the commits of projB's master branch:</p> <pre><code>git fetch projb </code></pre> <p>Rebase starting from the root of p... | 119, 733, 66446 | git, git-tfs, tfs | <h1>Merge no common commits into master branch?</h1>
<p>I have a Git repo that has a lot of commits and separate code, say</p>
<pre><code>/Proj1
</code></pre>
<p>I also have another Git repo that has 1 commit in it that is not a common commit,</p>
<pre><code>/Proj2
</code></pre>
<p>How can I merge the two repos and... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 20,163 | git | # Merge no common commits into master branch?
I have a Git repo that has a lot of commits and separate code, say
```
/Proj1
```
I also have another Git repo that has 1 commit in it that is not a common commit,
```
/Proj2
```
How can I merge the two repos and have history show up correctly with parent commits? Basi... | Cupcake helped solve this one. Here's one way to do this:
In ProjA, add Proj B as a remote:
```
git remote add projb C:\projB
```
Do a git fetch to grab all of the commits of projB's master branch:
```
git fetch projb
```
Rebase starting from the root of projB onto the tip (end) of projA's master branch:
```
git ... |
31388918 | How can I find an unreachable commit hash in a GIT repository by keywords? | 16 | 2015-07-13 16:42:58 | <p>I'm a bit puzzled by a GIT situation.</p>
<p>I'm working on a GIT versioned project and I just noticed that some commits that we thought were already on the master branch weeks ago are actually missing. I remembered these commits were pushed by someone else on a feature branch “feature/something", which does not ex... | 9,618 | 1,026,660 | 2019-02-12 13:40:44 | 31,390,760 | 22 | 2015-07-13 18:27:36 | 1,256,452 | 2019-02-12 13:40:44 | https://stackoverflow.com/q/31388918 | https://stackoverflow.com/a/31390760 | <p>When you delete a branch, you also delete its reflog. There's a separate reflog for <code>HEAD</code> that will retain a reference to commits that were on the deleted branch, but <em>only if you've had them checked-out</em>.</p>
<p>The difference between <code>--lost-found</code> and <code>--unreachable</code> is ... | <p>When you delete a branch, you also delete its reflog. There's a separate reflog for <code>HEAD</code> that will retain a reference to commits that were on the deleted branch, but <em>only if you've had them checked-out</em>.</p> <p>The difference between <code>--lost-found</code> and <code>--unreachable</code> is ... | 119 | git | <h1>How can I find an unreachable commit hash in a GIT repository by keywords?</h1>
<p>I'm a bit puzzled by a GIT situation.</p>
<p>I'm working on a GIT versioned project and I just noticed that some commits that we thought were already on the master branch weeks ago are actually missing. I remembered these commits we... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 20,164 | git | # How can I find an unreachable commit hash in a GIT repository by keywords?
I'm a bit puzzled by a GIT situation.
I'm working on a GIT versioned project and I just noticed that some commits that we thought were already on the master branch weeks ago are actually missing. I remembered these commits were pushed by som... | When you delete a branch, you also delete its reflog. There's a separate reflog for `HEAD` that will retain a reference to commits that were on the deleted branch, but *only if you've had them checked-out*.
The difference between `--lost-found` and `--unreachable` is subtle:1 see the [git glossary](https://git-scm.com... |
28079546 | How can I tell what happened in a Git commit with two parents that did not merge in the changes from the second parent? | 16 | 2015-01-22 00:43:03 | <p>In Gitk I can see a team member's commit (X) that has two parents: the first parent is his own previous commit (A), the other parent contains lots of other people commits (1 through 5). After his merge, all changes made by other people (1 through 5 and others) are no longer present at X, B, C, etc...</p>
<pre><code>... | 39,204 | 821,880 | 2023-09-12 16:54:31 | 28,079,918 | 22 | 2015-01-22 01:29:24 | 82,294 | 2015-01-22 01:29:24 | https://stackoverflow.com/q/28079546 | https://stackoverflow.com/a/28079918 | <blockquote>
<p>However, he says that he does sometimes do a pull origin master that results in everyone else's changes getting put in his index or working tree as if he had made those changes and not the actual authors of those changes.</p>
</blockquote>
<p>It sounds like he was getting merge conflicts but does not... | <blockquote> <p>However, he says that he does sometimes do a pull origin master that results in everyone else's changes getting put in his index or working tree as if he had made those changes and not the actual authors of those changes.</p> </blockquote> <p>It sounds like he was getting merge conflicts but does not... | 119, 28896, 28897, 47913, 53850 | git, git-commit, git-log, git-merge, git-pull | <h1>How can I tell what happened in a Git commit with two parents that did not merge in the changes from the second parent?</h1>
<p>In Gitk I can see a team member's commit (X) that has two parents: the first parent is his own previous commit (A), the other parent contains lots of other people commits (1 through 5). Af... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 20,165 | git | # How can I tell what happened in a Git commit with two parents that did not merge in the changes from the second parent?
In Gitk I can see a team member's commit (X) that has two parents: the first parent is his own previous commit (A), the other parent contains lots of other people commits (1 through 5). After his m... | > However, he says that he does sometimes do a pull origin master that results in everyone else's changes getting put in his index or working tree as if he had made those changes and not the actual authors of those changes.
It sounds like he was getting merge conflicts but does not understand what they are. This is an... |
15606177 | Git Repository Too Large | 16 | 2013-03-25 01:10:19 | <p>I have a project with ~12MB worth of code and assets in it. I've been tracking it using Git, and just noticed that my <code>.git</code> folder is now just over 1.83GB. It consists of a few small files, and then just one pack file that makes up about 1.82GB of the folder.</p>
<p>I've run <code>git gc --aggressive<... | 9,435 | 1,575,497 | 2021-04-21 18:10:11 | 15,628,711 | 22 | 2013-03-26 03:13:02 | 1,575,497 | 2021-04-21 18:10:11 | https://stackoverflow.com/q/15606177 | https://stackoverflow.com/a/15628711 | <p>Ok, the comments were a great start to understand what the root cause of the problem probably was. I don't really understand the <code>git filter-branch</code> command though, so I was a little wary of just using that.</p>
<p>I came across this tool: <a href="https://rtyley.github.io/bfg-repo-cleaner/" rel="nofollo... | <p>Ok, the comments were a great start to understand what the root cause of the problem probably was. I don't really understand the <code>git filter-branch</code> command though, so I was a little wary of just using that.</p> <p>I came across this tool: <a href="https://rtyley.github.io/bfg-repo-cleaner/" rel="nofollo... | 119, 44929, 91259 | git, git-gc, git-rewrite-history | <h1>Git Repository Too Large</h1>
<p>I have a project with ~12MB worth of code and assets in it. I've been tracking it using Git, and just noticed that my <code>.git</code> folder is now just over 1.83GB. It consists of a few small files, and then just one pack file that makes up about 1.82GB of the folder.</p>
<p>I... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 20,167 | git | # Git Repository Too Large
I have a project with ~12MB worth of code and assets in it. I've been tracking it using Git, and just noticed that my `.git` folder is now just over 1.83GB. It consists of a few small files, and then just one pack file that makes up about 1.82GB of the folder.
I've run `git gc --aggressive`... | Ok, the comments were a great start to understand what the root cause of the problem probably was. I don't really understand the `git filter-branch` command though, so I was a little wary of just using that.
I came across this tool: <https://rtyley.github.io/bfg-repo-cleaner/>
It worked wonders. My repo is now under ... |
14443472 | Atomic website update with Git | 16 | 2013-01-21 16:53:59 | <p>I'd like to update a live website in an atomic way. If we've made several changes to pages, images, and javascript, all of the changes should appear simultaneously with no downtime, inconsistency, or 404s.</p>
<p>If I simply copy the changed files into the website directory, then at least a few requests will see an... | 1,882 | 237,815 | 2019-04-23 16:13:07 | 14,443,816 | 22 | 2013-01-21 17:14:43 | 25,637 | 2019-04-23 16:13:07 | https://stackoverflow.com/q/14443472 | https://stackoverflow.com/a/14443816 | <p>You can do what you're imagining using symlinks. Moving one symlink over another is an atomic operation, so you should be able to avoid any 404 errors.</p>
<p>Your hook would <a href="https://stackoverflow.com/questions/160608/how-to-do-a-git-export-like-svn-export">deploy your site to a directory</a>, perhaps name... | <p>You can do what you're imagining using symlinks. Moving one symlink over another is an atomic operation, so you should be able to avoid any 404 errors.</p> <p>Your hook would <a href="https://stackoverflow.com/questions/160608/how-to-do-a-git-export-like-svn-export">deploy your site to a directory</a>, perhaps name... | 119, 5913, 20971 | atomic, git, web-deployment | <h1>Atomic website update with Git</h1>
<p>I'd like to update a live website in an atomic way. If we've made several changes to pages, images, and javascript, all of the changes should appear simultaneously with no downtime, inconsistency, or 404s.</p>
<p>If I simply copy the changed files into the website directory, ... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 20,168 | git | # Atomic website update with Git
I'd like to update a live website in an atomic way. If we've made several changes to pages, images, and javascript, all of the changes should appear simultaneously with no downtime, inconsistency, or 404s.
If I simply copy the changed files into the website directory, then at least a ... | You can do what you're imagining using symlinks. Moving one symlink over another is an atomic operation, so you should be able to avoid any 404 errors.
Your hook would [deploy your site to a directory](https://stackoverflow.com/questions/160608/how-to-do-a-git-export-like-svn-export), perhaps named after the [commit h... |
67425112 | How to enable VSCode Interactive Editor | 15 | 2021-05-06 19:51:18 | <p>Im using Vscode and Gitlens. I want to be able to do an interactive rebase. I have <code>core.editor=code --wait</code> set. But when I try and run a rebase I get the text-based editor instead, like so:</p>
<p><a href="https://i.sstatic.net/U4bx3.png" rel="noreferrer"><img src="https://i.sstatic.net/U4bx3.png" alt="... | 20,237 | 1,325,133 | 2024-11-16 14:03:46 | 67,531,714 | 22 | 2021-05-14 09:02:09 | 10,805,761 | 2021-05-15 18:11:03 | https://stackoverflow.com/q/67425112 | https://stackoverflow.com/a/67531714 | <p>Please check if the <strong>interactive rebase editor</strong> option is <strong>checked</strong> from within the GitLens settings in VS Code:</p>
<pre><code>Ctrl + Shift + P > GitLens: Open Settings
</code></pre>
<p><a href="https://i.sstatic.net/aE7z0.png" rel="noreferrer"><img src="https://i.sstatic.net/aE7z0.... | <p>Please check if the <strong>interactive rebase editor</strong> option is <strong>checked</strong> from within the GitLens settings in VS Code:</p> <pre><code>Ctrl + Shift + P > GitLens: Open Settings </code></pre> <p><a href="https://i.sstatic.net/aE7z0.png" rel="noreferrer"><img src="https://i.sstatic.net/aE7z0.... | 111608, 146697 | gitlens, visual-studio-code | <h1>How to enable VSCode Interactive Editor</h1>
<p>Im using Vscode and Gitlens. I want to be able to do an interactive rebase. I have <code>core.editor=code --wait</code> set. But when I try and run a rebase I get the text-based editor instead, like so:</p>
<p><a href="https://i.sstatic.net/U4bx3.png" rel="noreferrer"... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 20,169 | git | # How to enable VSCode Interactive Editor
Im using Vscode and Gitlens. I want to be able to do an interactive rebase. I have `core.editor=code --wait` set. But when I try and run a rebase I get the text-based editor instead, like so:
[](https://i.sstatic... | Please check if the **interactive rebase editor** option is **checked** from within the GitLens settings in VS Code:
```
Ctrl + Shift + P > GitLens: Open Settings
```
[](https://i.sstatic.net/aE7z0.png)
You should then be able to invoke the interactive rebase edito... |
40473094 | Create a git repository on server side | 15 | 2016-11-07 19:30:39 | <p>I have a big problem and I can't understand this topic. I have a server with a website. I created a repository there with <code>git init</code>. Than I made a <code>git add *</code> to add all files from my server to the repository. Than I made a <code>commit</code> to commit all files to the repository.</p>
<p>Tha... | 21,782 | 7,002,987 | 2025-09-14 06:59:49 | 40,479,963 | 22 | 2016-11-08 05:58:17 | 637,208 | 2025-09-14 06:59:49 | https://stackoverflow.com/q/40473094 | https://stackoverflow.com/a/40479963 | <p>You need to push changes to a central repository that both your local machine and server can pull from (or add them as remotes for each other). A service such as GitHub works nicely for this. Here are instructions for a full workflow that works well for this. Updated instructions can be found in this <a href="https... | <p>You need to push changes to a central repository that both your local machine and server can pull from (or add them as remotes for each other). A service such as GitHub works nicely for this. Here are instructions for a full workflow that works well for this. Updated instructions can be found in this <a href="https... | 58, 119, 382 | git, linux, wordpress | <h1>Create a git repository on server side</h1>
<p>I have a big problem and I can't understand this topic. I have a server with a website. I created a repository there with <code>git init</code>. Than I made a <code>git add *</code> to add all files from my server to the repository. Than I made a <code>commit</code> to... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 20,171 | git | # Create a git repository on server side
I have a big problem and I can't understand this topic. I have a server with a website. I created a repository there with `git init`. Than I made a `git add *` to add all files from my server to the repository. Than I made a `commit` to commit all files to the repository.
Than... | You need to push changes to a central repository that both your local machine and server can pull from (or add them as remotes for each other). A service such as GitHub works nicely for this. Here are instructions for a full workflow that works well for this. Updated instructions can be found in this [gist](https://gis... |
33734731 | Stop git flow from creating a tag automatically | 15 | 2015-11-16 11:51:51 | <p>When I found some bugs in my project,I created a hotfix branch:</p>
<pre><code>git flow hotfix start fixSomeBug
</code></pre>
<p>When I did some changes and commits,I wanted to merge these commits to master,so I typed</p>
<pre><code>git flow hotfix finish fixSomeBug
</code></pre>
<p>Next I needed to write three ... | 5,218 | 4,725,679 | 2020-04-23 10:35:15 | 33,736,847 | 22 | 2015-11-16 13:43:47 | 1,264,116 | 2015-11-16 13:51:40 | https://stackoverflow.com/q/33734731 | https://stackoverflow.com/a/33736847 | <p>You can use the -n operator. From the <a href="https://github.com/nvie/gitflow/wiki/Command-Line-Arguments#git-flow-hotfix-finish--fsumpkn-version" rel="noreferrer">docs</a></p>
<blockquote>
<p><strong>-n</strong> don't tag this release</p>
</blockquote>
<p>So the command will be like this</p>
<pre><code>git fl... | <p>You can use the -n operator. From the <a href="https://github.com/nvie/gitflow/wiki/Command-Line-Arguments#git-flow-hotfix-finish--fsumpkn-version" rel="noreferrer">docs</a></p> <blockquote> <p><strong>-n</strong> don't tag this release</p> </blockquote> <p>So the command will be like this</p> <pre><code>git fl... | 119, 64339 | git, git-flow | <h1>Stop git flow from creating a tag automatically</h1>
<p>When I found some bugs in my project,I created a hotfix branch:</p>
<pre><code>git flow hotfix start fixSomeBug
</code></pre>
<p>When I did some changes and commits,I wanted to merge these commits to master,so I typed</p>
<pre><code>git flow hotfix finish f... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 20,172 | git | # Stop git flow from creating a tag automatically
When I found some bugs in my project,I created a hotfix branch:
```
git flow hotfix start fixSomeBug
```
When I did some changes and commits,I wanted to merge these commits to master,so I typed
```
git flow hotfix finish fixSomeBug
```
Next I needed to write three ... | You can use the -n operator. From the [docs](https://github.com/nvie/gitflow/wiki/Command-Line-Arguments#git-flow-hotfix-finish--fsumpkn-version)
> **-n** don't tag this release
So the command will be like this
```
git flow hotfix finish -n fixSomeBug
``` |
33302424 | Format latitude and longitude axis labels in ggplot | 15 | 2015-10-23 12:31:45 | <p>I have a ggplot map, for example:</p>
<pre><code>library(ggmap)
ggmap(get_map())
</code></pre>
<p>I'd like the axis labels to be automatically labeled as N-S / W-E: in the above case, for example, instead of lon -95.4 it should show 95.4°E.</p>
<p>I have tried to mess with the <code>scales</code> package and usin... | 8,248 | 4,124,334 | 2022-11-29 02:58:39 | 33,302,968 | 22 | 2015-10-23 13:00:10 | 2,204,410 | 2015-10-26 15:44:57 | https://stackoverflow.com/q/33302424 | https://stackoverflow.com/a/33302968 | <p>Unfortunately, there is no such thing as <code>scale_x_longitude</code> or <code>scale_y_latitude</code> yet. In the meantime here is a workaround in which you specify the labels beforehand:</p>
<pre><code># load the needed libraries
library(ggplot2)
library(ggmap)
# get the map
m <- get_map(location=c(lon=0,la... | <p>Unfortunately, there is no such thing as <code>scale_x_longitude</code> or <code>scale_y_latitude</code> yet. In the meantime here is a workaround in which you specify the labels beforehand:</p> <pre><code># load the needed libraries library(ggplot2) library(ggmap) # get the map m <- get_map(location=c(lon=0,la... | 4452, 20301, 36606, 69457, 80986 | axis-labels, ggmap, ggplot2, latitude-longitude, r | <h1>Format latitude and longitude axis labels in ggplot</h1>
<p>I have a ggplot map, for example:</p>
<pre><code>library(ggmap)
ggmap(get_map())
</code></pre>
<p>I'd like the axis labels to be automatically labeled as N-S / W-E: in the above case, for example, instead of lon -95.4 it should show 95.4°E.</p>
<p>I hav... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 20,173 | git | # Format latitude and longitude axis labels in ggplot
I have a ggplot map, for example:
```
library(ggmap)
ggmap(get_map())
```
I'd like the axis labels to be automatically labeled as N-S / W-E: in the above case, for example, instead of lon -95.4 it should show 95.4°E.
I have tried to mess with the `scales` packag... | Unfortunately, there is no such thing as `scale_x_longitude` or `scale_y_latitude` yet. In the meantime here is a workaround in which you specify the labels beforehand:
```
# load the needed libraries
library(ggplot2)
library(ggmap)
# get the map
m <- get_map(location=c(lon=0,lat=0),zoom=5)
# create the breaks- and ... |
28682919 | How do I resolve git merge conflicts on a submodule from `git stash pop` | 15 | 2015-02-23 20:33:40 | <p>I have a git repository with a submodule. I need to pop changes I've previously stashed. However, this is causing a merge conflict on the submodule reference.</p>
<p>I want to keep my changes from the stash, except for the submodule. For most code files, I can resolve the conflict by editing the conflicting file, b... | 25,283 | 276,120 | 2019-04-04 14:53:36 | 28,682,970 | 22 | 2015-02-23 20:37:18 | 1,312,143 | 2015-02-23 20:37:18 | https://stackoverflow.com/q/28682919 | https://stackoverflow.com/a/28682970 | <p>As the <code>git status</code> comments say: <code>git reset HEAD some-submodule</code>.</p>
<p>By the way, after you've double checked that your tree and index are how they should be, you will probably want to <code>git stash drop</code>. <code>git stash pop</code> would normally do that, but doesn't when there ar... | <p>As the <code>git status</code> comments say: <code>git reset HEAD some-submodule</code>.</p> <p>By the way, after you've double checked that your tree and index are how they should be, you will probably want to <code>git stash drop</code>. <code>git stash pop</code> would normally do that, but doesn't when there ar... | 119, 13091, 106113 | git, git-merge-conflict, git-stash | <h1>How do I resolve git merge conflicts on a submodule from `git stash pop`</h1>
<p>I have a git repository with a submodule. I need to pop changes I've previously stashed. However, this is causing a merge conflict on the submodule reference.</p>
<p>I want to keep my changes from the stash, except for the submodule. ... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 20,174 | git | # How do I resolve git merge conflicts on a submodule from `git stash pop`
I have a git repository with a submodule. I need to pop changes I've previously stashed. However, this is causing a merge conflict on the submodule reference.
I want to keep my changes from the stash, except for the submodule. For most code fi... | As the `git status` comments say: `git reset HEAD some-submodule`.
By the way, after you've double checked that your tree and index are how they should be, you will probably want to `git stash drop`. `git stash pop` would normally do that, but doesn't when there are conflicts. |
25765237 | Is it possible to get branch names without clone or pull from git? | 15 | 2014-09-10 12:15:13 | <p>I want to get all branch names of a git repository. Currently, I clone the repository then get them on local machine. This is inefficient because all I need is names and nothing else.</p>
<p>I wonder if it is possible to do that? If so, what command I can use.</p>
| 5,511 | 53,261 | 2014-09-10 12:23:19 | 25,765,394 | 22 | 2014-09-10 12:23:19 | 6,309 | 2014-09-10 12:23:19 | https://stackoverflow.com/q/25765237 | https://stackoverflow.com/a/25765394 | <p>Locally, without cloning, you can type (using git <a href="http://git-scm.com/docs/git-ls-remote"><code>ls-remote</code></a>):</p>
<pre><code>git ls-remote /url/of/the/upstream/repo
</code></pre>
<p>That will list of the remote HEADS and their associated branches</p>
| <p>Locally, without cloning, you can type (using git <a href="http://git-scm.com/docs/git-ls-remote"><code>ls-remote</code></a>):</p> <pre><code>git ls-remote /url/of/the/upstream/repo </code></pre> <p>That will list of the remote HEADS and their associated branches</p> | 119, 76220 | git, git-branch | <h1>Is it possible to get branch names without clone or pull from git?</h1>
<p>I want to get all branch names of a git repository. Currently, I clone the repository then get them on local machine. This is inefficient because all I need is names and nothing else.</p>
<p>I wonder if it is possible to do that? If so, wha... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 20,175 | git | # Is it possible to get branch names without clone or pull from git?
I want to get all branch names of a git repository. Currently, I clone the repository then get them on local machine. This is inefficient because all I need is names and nothing else.
I wonder if it is possible to do that? If so, what command I can ... | Locally, without cloning, you can type (using git [`ls-remote`](http://git-scm.com/docs/git-ls-remote)):
```
git ls-remote /url/of/the/upstream/repo
```
That will list of the remote HEADS and their associated branches |
24121972 | Git - List files created by author | 15 | 2014-06-09 14:04:08 | <p>Is there a way to list files created by a specific author using <strong>Git</strong>?
I also need to filter these results, either by filename (regex/pattern) or folder where they were created.</p>
<p>So what I'm looking for is a list of created (not updated) files by author without filename duplication and without ... | 5,987 | 2,391,795 | 2021-07-07 08:21:29 | 24,134,098 | 22 | 2014-06-10 06:14:41 | 1,290,731 | 2014-06-10 06:14:41 | https://stackoverflow.com/q/24121972 | https://stackoverflow.com/a/24134098 | <p>List all commits adding files, showing the commit author and the added files; then paste the author to the front of each file listed:</p>
<pre><code># add `--author=pattern` to the log arguments to restrict by author
# add anything you like to the `--format=` template
# add any restrictions you like to the `/^A\t/`... | <p>List all commits adding files, showing the commit author and the added files; then paste the author to the front of each file listed:</p> <pre><code># add `--author=pattern` to the log arguments to restrict by author # add anything you like to the `--format=` template # add any restrictions you like to the `/^A\t/`... | 119, 942 | git, logging | <h1>Git - List files created by author</h1>
<p>Is there a way to list files created by a specific author using <strong>Git</strong>?
I also need to filter these results, either by filename (regex/pattern) or folder where they were created.</p>
<p>So what I'm looking for is a list of created (not updated) files by auth... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 20,176 | git | # Git - List files created by author
Is there a way to list files created by a specific author using **Git**?
I also need to filter these results, either by filename (regex/pattern) or folder where they were created.
So what I'm looking for is a list of created (not updated) files by author without filename duplicati... | List all commits adding files, showing the commit author and the added files; then paste the author to the front of each file listed:
```
# add `--author=pattern` to the log arguments to restrict by author
# add anything you like to the `--format=` template
# add any restrictions you like to the `/^A\t/` selector in t... |
19477327 | Cloning a subversion project from google code using git | 15 | 2013-10-20 12:31:02 | <p>There is someone's project at google code which I want to clone using git. However, nothing of these worked:</p>
<pre><code>git clone http://some_app.googlecode.com
git clone http://some_app.googlecode.com/svn
git clone http://some_app.googlecode.com/svn/trunk
git svn -s clone http://some_app.googlecode.com/svn/... | 32,202 | null | 2016-12-04 22:49:31 | 19,477,946 | 22 | 2013-10-20 13:32:34 | 97,627 | 2016-12-04 22:49:31 | https://stackoverflow.com/q/19477327 | https://stackoverflow.com/a/19477946 | <p>Since, based on the URL, it looks like you are trying to access a subversion repository, you cannot use git in a simple way to get to it.</p>
<p>Theoretically you could use <a href="https://www.kernel.org/pub/software/scm/git/docs/git-svn.html" rel="noreferrer">git-svn</a>, which you looked at in your last example,... | <p>Since, based on the URL, it looks like you are trying to access a subversion repository, you cannot use git in a simple way to get to it.</p> <p>Theoretically you could use <a href="https://www.kernel.org/pub/software/scm/git/docs/git-svn.html" rel="noreferrer">git-svn</a>, which you looked at in your last example,... | 63, 119, 456, 3682 | git, google-code, svn, version-control | <h1>Cloning a subversion project from google code using git</h1>
<p>There is someone's project at google code which I want to clone using git. However, nothing of these worked:</p>
<pre><code>git clone http://some_app.googlecode.com
git clone http://some_app.googlecode.com/svn
git clone http://some_app.googlecode.co... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 20,178 | git | # Cloning a subversion project from google code using git
There is someone's project at google code which I want to clone using git. However, nothing of these worked:
```
git clone http://some_app.googlecode.com
git clone http://some_app.googlecode.com/svn
git clone http://some_app.googlecode.com/svn/trunk
git svn... | Since, based on the URL, it looks like you are trying to access a subversion repository, you cannot use git in a simple way to get to it.
Theoretically you could use [git-svn](https://www.kernel.org/pub/software/scm/git/docs/git-svn.html), which you looked at in your last example, however if you don't know about it al... |
8216919 | Git have --no-prefix as the default? | 15 | 2011-11-21 18:49:13 | <p>We are using code collab and have to put the entry --no-prefix each time. Sometimes people forget and then they have to resubmit their code review. Is there a way to globally set the --no-prefix option so that the a/ b/ prefixes are never used?</p>
| 2,469 | 200,295 | 2016-10-26 11:49:56 | 8,217,013 | 22 | 2011-11-21 18:55:46 | 28,804 | 2011-11-21 18:55:46 | https://stackoverflow.com/q/8216919 | https://stackoverflow.com/a/8217013 | <p>Yep. Set the config option <code>diff.noprefix</code>:</p>
<pre><code>$ git config --global diff.noprefix true # All repos
$ git config diff.noprefix true # Current repo
</code></pre>
| <p>Yep. Set the config option <code>diff.noprefix</code>:</p> <pre><code>$ git config --global diff.noprefix true # All repos $ git config diff.noprefix true # Current repo </code></pre> | 119 | git | <h1>Git have --no-prefix as the default?</h1>
<p>We are using code collab and have to put the entry --no-prefix each time. Sometimes people forget and then they have to resubmit their code review. Is there a way to globally set the --no-prefix option so that the a/ b/ prefixes are never used?</p>
| q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 20,180 | git | # Git have --no-prefix as the default?
We are using code collab and have to put the entry --no-prefix each time. Sometimes people forget and then they have to resubmit their code review. Is there a way to globally set the --no-prefix option so that the a/ b/ prefixes are never used? | Yep. Set the config option `diff.noprefix`:
```
$ git config --global diff.noprefix true # All repos
$ git config diff.noprefix true # Current repo
``` |
7086325 | Setting umask in Git / Gitolite | 15 | 2011-08-16 23:27:26 | <p>I have set up Git and Gitolite, and at some point I recall having seen an "umask" setting, in one of the configuration files. Does this set the permissions for all files I sync using Git? That is exactly what I need. Where can I find it? </p>
| 11,098 | 852,091 | 2013-01-04 05:25:27 | 7,103,499 | 22 | 2011-08-18 06:54:06 | 6,309 | 2013-01-04 05:25:27 | https://stackoverflow.com/q/7086325 | https://stackoverflow.com/a/7103499 | <p>The <a href="https://github.com/sitaramc/gitolite/blob/v2.3.1/doc/tips-notes.mkd#umask-umask-setting" rel="noreferrer">umask settings in Gitolite</a> are there for changing the umask for newly created repos (and not about the files managed in versions by those repos).<br />
See <a href="http://sitaramc.github.com/gi... | <p>The <a href="https://github.com/sitaramc/gitolite/blob/v2.3.1/doc/tips-notes.mkd#umask-umask-setting" rel="noreferrer">umask settings in Gitolite</a> are there for changing the umask for newly created repos (and not about the files managed in versions by those repos).<br /> See <a href="http://sitaramc.github.com/gi... | 119, 359, 10519, 39151 | git, gitolite, permissions, umask | <h1>Setting umask in Git / Gitolite</h1>
<p>I have set up Git and Gitolite, and at some point I recall having seen an "umask" setting, in one of the configuration files. Does this set the permissions for all files I sync using Git? That is exactly what I need. Where can I find it? </p>
| q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 20,181 | git | # Setting umask in Git / Gitolite
I have set up Git and Gitolite, and at some point I recall having seen an "umask" setting, in one of the configuration files. Does this set the permissions for all files I sync using Git? That is exactly what I need. Where can I find it? | The [umask settings in Gitolite](https://github.com/sitaramc/gitolite/blob/v2.3.1/doc/tips-notes.mkd#umask-umask-setting) are there for changing the umask for newly created repos (and not about the files managed in versions by those repos).
See [gitolite.rc doc](http://sitaramc.github.com/gitolite/g2/rc.html):
> `$R... |
6147827 | Track files in local Git repo but ignore in remote | 15 | 2011-05-27 04:24:42 | <p>Is it possible to track folders and files in a local repo but not on a remote so that when you push changes, they don't get pushed remotely? The reason being is that I'm using Beanstalk to deploy a website I'm working on locally. My local repo contains folders for artwork and other content that I want to be able to ... | 4,764 | 772,437 | 2011-05-27 04:44:01 | 6,147,914 | 22 | 2011-05-27 04:41:40 | 576,139 | 2011-05-27 04:41:40 | https://stackoverflow.com/q/6147827 | https://stackoverflow.com/a/6147914 | <p>Create a separate git repo just for your graphics. Put it as a subdirectory in the main project. Add the subfolder to .gitignore in your main repo. Then you won't have to mess with submodules, but you can still version your local files.</p>
<pre><code>mainrepo
|
|-- .git
|-- .gitignore (contains "graphicsrepo")
|--... | <p>Create a separate git repo just for your graphics. Put it as a subdirectory in the main project. Add the subfolder to .gitignore in your main repo. Then you won't have to mess with submodules, but you can still version your local files.</p> <pre><code>mainrepo | |-- .git |-- .gitignore (contains "graphicsrepo") |--... | 119 | git | <h1>Track files in local Git repo but ignore in remote</h1>
<p>Is it possible to track folders and files in a local repo but not on a remote so that when you push changes, they don't get pushed remotely? The reason being is that I'm using Beanstalk to deploy a website I'm working on locally. My local repo contains fold... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 20,182 | git | # Track files in local Git repo but ignore in remote
Is it possible to track folders and files in a local repo but not on a remote so that when you push changes, they don't get pushed remotely? The reason being is that I'm using Beanstalk to deploy a website I'm working on locally. My local repo contains folders for a... | Create a separate git repo just for your graphics. Put it as a subdirectory in the main project. Add the subfolder to .gitignore in your main repo. Then you won't have to mess with submodules, but you can still version your local files.
```
mainrepo
|
|-- .git
|-- .gitignore (contains "graphicsrepo")
|-- graphicsrepo
... |
31904167 | Profiling "git add ." - Why is it slow? | 14 | 2015-08-09 12:21:23 | <p>Assume project where no add and commit has been done for a long time.
I do <code>git add .</code> but it takes too much time.
I would like to estimate which files/directories are most expensive in the current case.
I have a good <code>.gitignore</code> file which works sufficiently but, still sometimes, I have t... | 45,211 | 54,964 | 2024-02-06 22:33:22 | 31,904,237 | 22 | 2015-08-09 12:30:03 | 1,445,366 | 2015-08-09 12:30:03 | https://stackoverflow.com/q/31904167 | https://stackoverflow.com/a/31904237 | <p>Git slowness is generally from large binary files. This isn't because they're binary, just because binary files tend to be large and more complex to compress & diff.</p>
<p>Based on your edit indicating the file sizes, I suspect this is your problem.</p>
<p>The answers to <a href="https://stackoverflow.com/q/3... | <p>Git slowness is generally from large binary files. This isn't because they're binary, just because binary files tend to be large and more complex to compress & diff.</p> <p>Based on your edit indicating the file sizes, I suspect this is your problem.</p> <p>The answers to <a href="https://stackoverflow.com/q/3... | 119 | git | <h1>Profiling "git add ." - Why is it slow?</h1>
<p>Assume project where no add and commit has been done for a long time.
I do <code>git add .</code> but it takes too much time.
I would like to estimate which files/directories are most expensive in the current case.
I have a good <code>.gitignore</code> file which ... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 20,186 | git | # Profiling "git add ." - Why is it slow?
Assume project where no add and commit has been done for a long time.
I do `git add .` but it takes too much time.
I would like to estimate which files/directories are most expensive in the current case.
I have a good `.gitignore` file which works sufficiently but, still somet... | Git slowness is generally from large binary files. This isn't because they're binary, just because binary files tend to be large and more complex to compress & diff.
Based on your edit indicating the file sizes, I suspect this is your problem.
The answers to [this question](https://stackoverflow.com/q/3055506/1445366... |
19871484 | Prepend Git commit message with partial branch name | 14 | 2013-11-09 01:53:52 | <p>My current branch naming convention is as such:</p>
<pre><code>ticket-45-my-new-feature-branch-description
</code></pre>
<p>I am currently using this code in my .git/hooks/prepare-commit-msg file to prepend every commit message with the branch name as such:</p>
<pre><code>BRANCH_NAME=$(git branch 2>/dev/null |... | 5,747 | 828,761 | 2015-07-22 19:40:28 | 19,871,683 | 22 | 2013-11-09 02:25:00 | 1,256,452 | 2015-07-22 19:40:28 | https://stackoverflow.com/q/19871484 | https://stackoverflow.com/a/19871683 | <p>Ok, first, this:</p>
<pre><code>BRANCH_NAME=$(git branch 2>/dev/null | grep -e ^* | tr -d ' *')
</code></pre>
<p>is major overkill :-) Use:</p>
<pre><code>branch=$(git symbolic-ref --short HEAD) || ...
</code></pre>
<p>to get the current branch name. The part after <code>||</code> is "what to do if you're n... | <p>Ok, first, this:</p> <pre><code>BRANCH_NAME=$(git branch 2>/dev/null | grep -e ^* | tr -d ' *') </code></pre> <p>is major overkill :-) Use:</p> <pre><code>branch=$(git symbolic-ref --short HEAD) || ... </code></pre> <p>to get the current branch name. The part after <code>||</code> is "what to do if you're n... | 18, 119, 1879 | branch, git, regex | <h1>Prepend Git commit message with partial branch name</h1>
<p>My current branch naming convention is as such:</p>
<pre><code>ticket-45-my-new-feature-branch-description
</code></pre>
<p>I am currently using this code in my .git/hooks/prepare-commit-msg file to prepend every commit message with the branch name as su... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 20,187 | git | # Prepend Git commit message with partial branch name
My current branch naming convention is as such:
```
ticket-45-my-new-feature-branch-description
```
I am currently using this code in my .git/hooks/prepare-commit-msg file to prepend every commit message with the branch name as such:
```
BRANCH_NAME=$(git branch... | Ok, first, this:
```
BRANCH_NAME=$(git branch 2>/dev/null | grep -e ^* | tr -d ' *')
```
is major overkill :-) Use:
```
branch=$(git symbolic-ref --short HEAD) || ...
```
to get the current branch name. The part after `||` is "what to do if you're not on a branch" (i.e., if you're in "detached head" mode)—you'll ha... |
10130970 | How to completely remove .svn files in Git | 14 | 2012-04-12 20:05:39 | <p>I am trying to remove all .svn files and folders for my repo. I am using Git. But I downloaded the source from a server which came with all the nasty .svn files. I don't want to committ these. I have already created a .gitignore file to completely ignore .svn files but this isn't working. </p>
<p>I have already sea... | 3,329 | 946,869 | 2012-04-12 20:15:24 | 10,131,065 | 22 | 2012-04-12 20:12:51 | 390,829 | 2012-04-12 20:12:51 | https://stackoverflow.com/q/10130970 | https://stackoverflow.com/a/10131065 | <pre><code>find . -name '.svn' -type d -print0 | xargs -0 rm -rf
git commit -a -m "Deleting all .svn folders and files"
</code></pre>
<p>You can also update the .gitignore file afterwards.</p>
| <pre><code>find . -name '.svn' -type d -print0 | xargs -0 rm -rf git commit -a -m "Deleting all .svn folders and files" </code></pre> <p>You can also update the .gitignore file afterwards.</p> | 63, 119, 3346 | dvcs, git, svn | <h1>How to completely remove .svn files in Git</h1>
<p>I am trying to remove all .svn files and folders for my repo. I am using Git. But I downloaded the source from a server which came with all the nasty .svn files. I don't want to committ these. I have already created a .gitignore file to completely ignore .svn files... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 20,189 | git | # How to completely remove .svn files in Git
I am trying to remove all .svn files and folders for my repo. I am using Git. But I downloaded the source from a server which came with all the nasty .svn files. I don't want to committ these. I have already created a .gitignore file to completely ignore .svn files but this... | ```
find . -name '.svn' -type d -print0 | xargs -0 rm -rf
git commit -a -m "Deleting all .svn folders and files"
```
You can also update the .gitignore file afterwards. |
6289001 | git am/format-patch: control format of line endings | 14 | 2011-06-09 06:41:25 | <p>I created a patch from three commits using</p>
<pre><code>git format-patch <revision_three_commits_ago>
</code></pre>
<p>This creates three patch files that I mailed from my notebook and read the mail on my desktop computer (both are Windows boxes).</p>
<p>When I do now </p>
<pre><code>git am --3way --igno... | 11,189 | 520,162 | 2025-03-24 16:52:05 | 6,677,017 | 22 | 2011-07-13 09:47:41 | 520,162 | 2011-07-13 10:05:14 | https://stackoverflow.com/q/6289001 | https://stackoverflow.com/a/6677017 | <p>After playing around with various options (<code>core.autocrlf</code>, <code>core.eol</code>) I found that using </p>
<pre><code>git am --keep-cr
</code></pre>
<p>does the trick (but causes a warning about trailing whitespaces).</p>
<p>No manual editing of the patch file or other dirt is neccessary.</p>
<p>But, ... | <p>After playing around with various options (<code>core.autocrlf</code>, <code>core.eol</code>) I found that using </p> <pre><code>git am --keep-cr </code></pre> <p>does the trick (but causes a warning about trailing whitespaces).</p> <p>No manual editing of the patch file or other dirt is neccessary.</p> <p>But, ... | 119, 27597 | format-patch, git | <h1>git am/format-patch: control format of line endings</h1>
<p>I created a patch from three commits using</p>
<pre><code>git format-patch <revision_three_commits_ago>
</code></pre>
<p>This creates three patch files that I mailed from my notebook and read the mail on my desktop computer (both are Windows boxes)... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 20,190 | git | # git am/format-patch: control format of line endings
I created a patch from three commits using
```
git format-patch <revision_three_commits_ago>
```
This creates three patch files that I mailed from my notebook and read the mail on my desktop computer (both are Windows boxes).
When I do now
```
git am --3way --i... | After playing around with various options (`core.autocrlf`, `core.eol`) I found that using
```
git am --keep-cr
```
does the trick (but causes a warning about trailing whitespaces).
No manual editing of the patch file or other dirt is neccessary.
But, (of course) the hash is different as described in [nikai](https:... |
3894808 | new git repository and already git reset does not work | 14 | 2010-10-08 22:43:33 | <p>1) I did <code>git init</code> in a folder</p>
<p>2) added some project files</p>
<p>3) I did <code>git add *</code> so it added recursively all files</p>
<p>4) I realised that I added a bunch of files I don't want to be versioned, so I wanted to undo the add</p>
<p>5) <code>git reset</code> gives me the followi... | 8,031 | 170,521 | 2015-02-13 22:16:27 | 3,894,817 | 22 | 2010-10-08 22:46:03 | 6,309 | 2010-10-08 22:51:40 | https://stackoverflow.com/q/3894808 | https://stackoverflow.com/a/3894817 | <pre><code>git rm [-r] --cache -- <file>…
</code></pre>
<p>would be the right command to remove from the index the file you don't want to commit.<br>
Any <code>reset</code> command won't work, since you have to any commit yet in your newly created repository.</p>
<p>From the <a href="http://www.kernel.org/pub/s... | <pre><code>git rm [-r] --cache -- <file>… </code></pre> <p>would be the right command to remove from the index the file you don't want to commit.<br> Any <code>reset</code> command won't work, since you have to any commit yet in your newly created repository.</p> <p>From the <a href="http://www.kernel.org/pub/s... | 119 | git | <h1>new git repository and already git reset does not work</h1>
<p>1) I did <code>git init</code> in a folder</p>
<p>2) added some project files</p>
<p>3) I did <code>git add *</code> so it added recursively all files</p>
<p>4) I realised that I added a bunch of files I don't want to be versioned, so I wanted to und... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 20,191 | git | # new git repository and already git reset does not work
1) I did `git init` in a folder
2) added some project files
3) I did `git add *` so it added recursively all files
4) I realised that I added a bunch of files I don't want to be versioned, so I wanted to undo the add
5) `git reset` gives me the following err... | ```
git rm [-r] --cache -- <file>…
```
would be the right command to remove from the index the file you don't want to commit.
Any `reset` command won't work, since you have to any commit yet in your newly created repository.
From the [`git rm` man page](http://www.kernel.org/pub/software/scm/git/docs/git-rm.html):
... |
37342809 | Git remote url with username in form of email address | 13 | 2016-05-20 09:20:36 | <p>I would like to have my git username saved in remote url address in order not to type it every time I push or pull.</p>
<p>I found many answers (<a href="https://stackoverflow.com/a/10054470/1364327">such as this one</a>) which solves the problem. The thing is that my username contains <code>@</code> since it is (a... | 4,674 | 1,364,327 | 2016-05-20 09:24:45 | 37,342,902 | 22 | 2016-05-20 09:24:45 | 438,742 | 2016-05-20 09:24:45 | https://stackoverflow.com/q/37342809 | https://stackoverflow.com/a/37342902 | <p>Use url-escaping, i.e. replace <code>@</code> in the username with <code>%40</code>:</p>
<pre><code>http://me%40domain.com@myrepo.git
</code></pre>
| <p>Use url-escaping, i.e. replace <code>@</code> in the username with <code>%40</code>:</p> <pre><code>http://me%40domain.com@myrepo.git </code></pre> | 119 | git | <h1>Git remote url with username in form of email address</h1>
<p>I would like to have my git username saved in remote url address in order not to type it every time I push or pull.</p>
<p>I found many answers (<a href="https://stackoverflow.com/a/10054470/1364327">such as this one</a>) which solves the problem. The t... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 20,194 | git | # Git remote url with username in form of email address
I would like to have my git username saved in remote url address in order not to type it every time I push or pull.
I found many answers ([such as this one](https://stackoverflow.com/a/10054470/1364327)) which solves the problem. The thing is that my username co... | Use url-escaping, i.e. replace `@` in the username with `%40`:
```
http://me%40domain.com@myrepo.git
``` |
37195093 | git rebase -i --retain-empty-commits | 13 | 2016-05-12 18:45:05 | <p>By default, when you use <code>git rebase -i</code> it comments out empty commits and I have to uncomment them (they're helpful to me). Is there an option to the rebase command that will prevent this unwanted assumption that I don't want to preserve them?</p>
| 3,726 | 714,112 | 2025-04-01 00:57:13 | 37,195,191 | 22 | 2016-05-12 18:50:40 | 714,112 | 2018-04-23 20:01:39 | https://stackoverflow.com/q/37195093 | https://stackoverflow.com/a/37195191 | <p>Okay, that was easier than expected:</p>
<pre><code>git rebase -i --keep-empty
</code></pre>
<p>Hopefully this post will speed up others Googling to find the answer.</p>
| <p>Okay, that was easier than expected:</p> <pre><code>git rebase -i --keep-empty </code></pre> <p>Hopefully this post will speed up others Googling to find the answer.</p> | 119, 29934 | git, git-rebase | <h1>git rebase -i --retain-empty-commits</h1>
<p>By default, when you use <code>git rebase -i</code> it comments out empty commits and I have to uncomment them (they're helpful to me). Is there an option to the rebase command that will prevent this unwanted assumption that I don't want to preserve them?</p>
| q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 20,195 | git | # git rebase -i --retain-empty-commits
By default, when you use `git rebase -i` it comments out empty commits and I have to uncomment them (they're helpful to me). Is there an option to the rebase command that will prevent this unwanted assumption that I don't want to preserve them? | Okay, that was easier than expected:
```
git rebase -i --keep-empty
```
Hopefully this post will speed up others Googling to find the answer. |
19502634 | Git diff different directories across branches | 13 | 2013-10-21 19:04:49 | <p>I'd like to compare two branches that have diverged significantly. I would also like to limit my comparison to a particular subdirectory where the files were moved in only one of the branches.</p>
<p>Example layout:</p>
<pre><code>branch-a
└── sub
├── file1
├── file2
└── file3
branch-b
├── file2
├── fi... | 6,381 | 329,215 | 2016-05-13 00:23:04 | 19,520,756 | 22 | 2013-10-22 14:31:41 | 329,215 | 2013-10-22 14:31:41 | https://stackoverflow.com/q/19502634 | https://stackoverflow.com/a/19520756 | <p>I figured it out:</p>
<p><code>git diff branch-a:sub branch-b</code></p>
| <p>I figured it out:</p> <p><code>git diff branch-a:sub branch-b</code></p> | 119, 9033, 76220 | git, git-branch, git-diff | <h1>Git diff different directories across branches</h1>
<p>I'd like to compare two branches that have diverged significantly. I would also like to limit my comparison to a particular subdirectory where the files were moved in only one of the branches.</p>
<p>Example layout:</p>
<pre><code>branch-a
└── sub
├── fil... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 20,197 | git | # Git diff different directories across branches
I'd like to compare two branches that have diverged significantly. I would also like to limit my comparison to a particular subdirectory where the files were moved in only one of the branches.
Example layout:
```
branch-a
└── sub
├── file1
├── file2
└── fi... | I figured it out:
`git diff branch-a:sub branch-b` |
16651506 | git branch -d <BRANCH>: Fatal - Couldn't look up commit object for HEAD | 13 | 2013-05-20 14:15:52 | <p>Say I am in a bare repository (a remote), if I try to delete a branch with <code>git branch -d <branch_name></code> I get the following error:</p>
<pre><code>fatal: Couldn't look up commit object for HEAD
</code></pre>
<p>Why? Is there a reason why I should be unable to delete branches from a bare repositor... | 21,197 | 283,296 | 2022-11-25 20:12:00 | 16,651,583 | 22 | 2013-05-20 14:19:33 | null | 2013-05-20 14:19:33 | https://stackoverflow.com/q/16651506 | https://stackoverflow.com/a/16651583 | <p>Make sure you use a capitol <code>D</code> in the command, in this case you would type <code>git branch -D <branch_name></code>. Note that this will only delete the branch from your local computer</p>
<p>If you are trying to delete a <em>remote</em> branch, type <code>git push origin :<branch_name></cod... | <p>Make sure you use a capitol <code>D</code> in the command, in this case you would type <code>git branch -D <branch_name></code>. Note that this will only delete the branch from your local computer</p> <p>If you are trying to delete a <em>remote</em> branch, type <code>git push origin :<branch_name></cod... | 119 | git | <h1>git branch -d <BRANCH>: Fatal - Couldn't look up commit object for HEAD</h1>
<p>Say I am in a bare repository (a remote), if I try to delete a branch with <code>git branch -d <branch_name></code> I get the following error:</p>
<pre><code>fatal: Couldn't look up commit object for HEAD
</code></pre>
<p>Why? I... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 20,198 | git | # git branch -d : Fatal - Couldn't look up commit object for HEAD
Say I am in a bare repository (a remote), if I try to delete a branch with `git branch -d <branch_name>` I get the following error:
```
fatal: Couldn't look up commit object for HEAD
```
Why? Is there a reason why I should be unable to delete branches... | Make sure you use a capitol `D` in the command, in this case you would type `git branch -D <branch_name>`. Note that this will only delete the branch from your local computer
If you are trying to delete a *remote* branch, type `git push origin :<branch_name>` (remember to add the colon) |
10132252 | What do these git symbols mean? | 13 | 2012-04-12 21:38:14 | <p>In git, what does the at symbol and curly braces mean?</p>
<pre><code>git reset --soft HEAD@{1}
</code></pre>
<p>Likewise, what do double hyphens mean? Not as an option, but as used like so:</p>
<pre><code>git checkout abcd1234 -- .
</code></pre>
<p>I'm sure this is referenced somewhere obvious, but I'm having a... | 12,381 | 1,241,454 | 2021-04-01 19:20:13 | 10,132,367 | 22 | 2012-04-12 21:47:46 | 77,567 | 2021-04-01 19:20:13 | https://stackoverflow.com/q/10132252 | https://stackoverflow.com/a/10132367 | <p>The at and curly braces are documented in the <a href="https://www.git-scm.com/docs/gitrevisions" rel="nofollow noreferrer"><code>gitrevisions</code> manual page</a>.</p>
<p>In your example, it means the prior value of the <code>HEAD</code> ref - whatever commit <code>HEAD</code> pointed to before your most recent c... | <p>The at and curly braces are documented in the <a href="https://www.git-scm.com/docs/gitrevisions" rel="nofollow noreferrer"><code>gitrevisions</code> manual page</a>.</p> <p>In your example, it means the prior value of the <code>HEAD</code> ref - whatever commit <code>HEAD</code> pointed to before your most recent c... | 119 | git | <h1>What do these git symbols mean?</h1>
<p>In git, what does the at symbol and curly braces mean?</p>
<pre><code>git reset --soft HEAD@{1}
</code></pre>
<p>Likewise, what do double hyphens mean? Not as an option, but as used like so:</p>
<pre><code>git checkout abcd1234 -- .
</code></pre>
<p>I'm sure this is refer... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 20,199 | git | # What do these git symbols mean?
In git, what does the at symbol and curly braces mean?
```
git reset --soft HEAD@{1}
```
Likewise, what do double hyphens mean? Not as an option, but as used like so:
```
git checkout abcd1234 -- .
```
I'm sure this is referenced somewhere obvious, but I'm having a hard time findi... | The at and curly braces are documented in the [`gitrevisions` manual page](https://www.git-scm.com/docs/gitrevisions).
In your example, it means the prior value of the `HEAD` ref - whatever commit `HEAD` pointed to before your most recent commit or checkout or whatever.
The double hyphens separate flags from non-flag... |
8014991 | How do I Add a A Package To Buildroot Which Is Available In A Git Repository? | 13 | 2011-11-04 19:53:50 | <p>I'm making an embedded Linux system and I wanted to add the '<a href="http://www.bluez.org/" rel="noreferrer">bluez</a>' package (and bluetooth utilities) to the packages of the Buildroot environment.</p>
<p>Unfortunately the tar ball seems to be unavailable but the source is available from Git repositiory but I'm ... | 21,190 | 642,680 | 2019-05-08 10:01:51 | 8,020,317 | 22 | 2011-11-05 13:01:13 | 643,208 | 2011-11-05 13:01:13 | https://stackoverflow.com/q/8014991 | https://stackoverflow.com/a/8020317 | <p>Buildroot already has a <strong>bluez</strong> package, which will be part of the upcoming 2011.11 release. In the mean time, you can either use the latest Git version of Buildroot, or back-port the bluez package into an older version of Buildroot.</p>
<p>Coming back to the initial question, Buildroot is capable of... | <p>Buildroot already has a <strong>bluez</strong> package, which will be part of the upcoming 2011.11 release. In the mean time, you can either use the latest Git version of Buildroot, or back-port the bluez package into an older version of Buildroot.</p> <p>Coming back to the initial question, Buildroot is capable of... | 119, 236, 5117, 28643, 36913 | bluetooth, buildroot, embedded, embedded-linux, git | <h1>How do I Add a A Package To Buildroot Which Is Available In A Git Repository?</h1>
<p>I'm making an embedded Linux system and I wanted to add the '<a href="http://www.bluez.org/" rel="noreferrer">bluez</a>' package (and bluetooth utilities) to the packages of the Buildroot environment.</p>
<p>Unfortunately the tar... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 20,200 | git | # How do I Add a A Package To Buildroot Which Is Available In A Git Repository?
I'm making an embedded Linux system and I wanted to add the '[bluez](http://www.bluez.org/)' package (and bluetooth utilities) to the packages of the Buildroot environment.
Unfortunately the tar ball seems to be unavailable but the source... | Buildroot already has a **bluez** package, which will be part of the upcoming 2011.11 release. In the mean time, you can either use the latest Git version of Buildroot, or back-port the bluez package into an older version of Buildroot.
Coming back to the initial question, Buildroot is capable of fetching source code f... |
44155648 | ignore a particular folder only in .gitignore but allow other folders with same name to be checked in | 12 | 2017-05-24 10:23:48 | <p>I want to ignore a dist folder at top level of my project, but then I have another dist folder inside my project for my styles, which I want to keep. So keeping a <code>dist</code> in <code>.gitignore</code> causes both of them to be ignored. What is the correct way to handle this.</p>
| 4,854 | 1,758,058 | 2020-06-08 01:12:21 | 44,157,136 | 22 | 2017-05-24 11:31:22 | 589,329 | 2017-05-24 11:31:22 | https://stackoverflow.com/q/44155648 | https://stackoverflow.com/a/44157136 | <p>If you have <code>dist</code> in your ignore file, all files and folders named <code>dist</code> in the same directory as the ignore file and in all subdirectories recursively are ignored.</p>
<p>If you have <code>dist/</code> in your ignore file, all folders but not files named <code>dist</code> in the same direct... | <p>If you have <code>dist</code> in your ignore file, all files and folders named <code>dist</code> in the same directory as the ignore file and in all subdirectories recursively are ignored.</p> <p>If you have <code>dist/</code> in your ignore file, all folders but not files named <code>dist</code> in the same direct... | 119, 25056 | git, gitignore | <h1>ignore a particular folder only in .gitignore but allow other folders with same name to be checked in</h1>
<p>I want to ignore a dist folder at top level of my project, but then I have another dist folder inside my project for my styles, which I want to keep. So keeping a <code>dist</code> in <code>.gitignore</code... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 20,201 | git | # ignore a particular folder only in .gitignore but allow other folders with same name to be checked in
I want to ignore a dist folder at top level of my project, but then I have another dist folder inside my project for my styles, which I want to keep. So keeping a `dist` in `.gitignore` causes both of them to be ign... | If you have `dist` in your ignore file, all files and folders named `dist` in the same directory as the ignore file and in all subdirectories recursively are ignored.
If you have `dist/` in your ignore file, all folders but not files named `dist` in the same directory as the ignore file and in all subdirectories recur... |
42675983 | Commit signing using sourcetree on windows | 12 | 2017-03-08 15:55:10 | <p>Currently (13th Feb 2018) Sourcetree supports <a href="https://confluence.atlassian.com/sourcetreekb/setup-gpg-to-sign-commits-within-sourcetree-765397791.html" rel="noreferrer">commit signing in Mac version</a> only.</p>
<p>And from <a href="https://answers.atlassian.com/questions/210979/does-sourcetree-support-gi... | 12,516 | 3,196,361 | 2020-09-14 02:42:59 | 42,675,984 | 22 | 2017-03-08 15:55:10 | 3,196,361 | 2017-11-08 18:32:47 | https://stackoverflow.com/q/42675983 | https://stackoverflow.com/a/42675984 | <p>Well, the answer is yes and no.</p>
<p>The work around I've figured out is as follow (I assumed that you've already the GPG key setup, if not follow <a href="https://help.github.com/articles/signing-commits-with-gpg/" rel="noreferrer">github's tutorial on how to set it up</a>)</p>
<h2>Step 1 Install git shell for ... | <p>Well, the answer is yes and no.</p> <p>The work around I've figured out is as follow (I assumed that you've already the GPG key setup, if not follow <a href="https://help.github.com/articles/signing-commits-with-gpg/" rel="noreferrer">github's tutorial on how to set it up</a>)</p> <h2>Step 1 Install git shell for ... | 119, 90056, 119594 | atlassian-sourcetree, git, git-sign | <h1>Commit signing using sourcetree on windows</h1>
<p>Currently (13th Feb 2018) Sourcetree supports <a href="https://confluence.atlassian.com/sourcetreekb/setup-gpg-to-sign-commits-within-sourcetree-765397791.html" rel="noreferrer">commit signing in Mac version</a> only.</p>
<p>And from <a href="https://answers.atlas... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 20,202 | git | # Commit signing using sourcetree on windows
Currently (13th Feb 2018) Sourcetree supports [commit signing in Mac version](https://confluence.atlassian.com/sourcetreekb/setup-gpg-to-sign-commits-within-sourcetree-765397791.html) only.
And from [this question](https://answers.atlassian.com/questions/210979/does-source... | Well, the answer is yes and no.
The work around I've figured out is as follow (I assumed that you've already the GPG key setup, if not follow [github's tutorial on how to set it up](https://help.github.com/articles/signing-commits-with-gpg/))
## Step 1 Install git shell for Windows
(If you haven't already)
## Step ... |
42553685 | Setting Git username and email without using .gitconfig? | 12 | 2017-03-02 11:05:13 | <p>I have a dotfiles repository for macOS which contains the <code>.gitconfig</code> file. I would like to keep <code>username</code> and <code>email</code> separate from this file so that these variables are never committed as part of my public dotfiles repository.</p>
<p>One approach I have seen is to specify a file... | 10,390 | null | 2023-03-07 16:41:41 | 42,571,751 | 22 | 2017-03-03 06:03:58 | null | 2017-03-03 06:03:58 | https://stackoverflow.com/q/42553685 | https://stackoverflow.com/a/42571751 | <p>I figured out the solution:</p>
<p>Add the following to your dotfiles' <code>.gitconfig</code> file:</p>
<blockquote>
<p><code>[user]
# These values are set in ~/.gitconfig_local</code></p>
<p><code>[include]
path = ~/.gitconfig_local</code></p>
</blockquote>
<p>Create a file in <code>~/</code>... | <p>I figured out the solution:</p> <p>Add the following to your dotfiles' <code>.gitconfig</code> file:</p> <blockquote> <p><code>[user] # These values are set in ~/.gitconfig_local</code></p> <p><code>[include] path = ~/.gitconfig_local</code></p> </blockquote> <p>Create a file in <code>~/</code>... | 119, 54848 | dotfiles, git | <h1>Setting Git username and email without using .gitconfig?</h1>
<p>I have a dotfiles repository for macOS which contains the <code>.gitconfig</code> file. I would like to keep <code>username</code> and <code>email</code> separate from this file so that these variables are never committed as part of my public dotfiles... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 20,203 | git | # Setting Git username and email without using .gitconfig?
I have a dotfiles repository for macOS which contains the `.gitconfig` file. I would like to keep `username` and `email` separate from this file so that these variables are never committed as part of my public dotfiles repository.
One approach I have seen is ... | I figured out the solution:
Add the following to your dotfiles' `.gitconfig` file:
> `[user]
> # These values are set in ~/.gitconfig_local`
>
> `[include]
> path = ~/.gitconfig_local`
Create a file in `~/` called `.gitconfig_local` and add the values you don't want committed or made public in your `.gitconfig` file... |
40230842 | I cannot ignore pycache and db.sqlite on Django even though it refers them at .gitignore | 12 | 2016-10-25 03:22:35 | <p>I'd like to ignore the changes of pycache and db.sqlite of Django project. I refer them at <code>.gitignore</code>,however git catches the variation of them. Could you tell me what is problem if you know it?
I attached my .gitignore at the end of sentence.</p>
<p><a href="https://i.sstatic.net/0RRxe.png" rel="noref... | 8,292 | 3,575,850 | 2020-08-15 11:09:33 | 40,231,269 | 22 | 2016-10-25 04:13:22 | 3,575,850 | 2020-08-15 11:09:33 | https://stackoverflow.com/q/40230842 | https://stackoverflow.com/a/40231269 | <p>As follows, I've solved the problem.</p>
<pre><code>git rm -r --cached . # will delete whole git history, use with caution
git add .
git commit -m
git push ~
</code></pre>
| <p>As follows, I've solved the problem.</p> <pre><code>git rm -r --cached . # will delete whole git history, use with caution git add . git commit -m git push ~ </code></pre> | 16, 119, 243, 25056, 60010 | django, git, gitignore, python, python-3.x | <h1>I cannot ignore pycache and db.sqlite on Django even though it refers them at .gitignore</h1>
<p>I'd like to ignore the changes of pycache and db.sqlite of Django project. I refer them at <code>.gitignore</code>,however git catches the variation of them. Could you tell me what is problem if you know it?
I attached ... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 20,204 | git | # I cannot ignore pycache and db.sqlite on Django even though it refers them at .gitignore
I'd like to ignore the changes of pycache and db.sqlite of Django project. I refer them at `.gitignore`,however git catches the variation of them. Could you tell me what is problem if you know it?
I attached my .gitignore at the... | As follows, I've solved the problem.
```
git rm -r --cached . # will delete whole git history, use with caution
git add .
git commit -m
git push ~
``` |
30908013 | How to get lat and long from sdo_geometry in oracle | 12 | 2015-06-18 06:31:00 | <p>How can I get lat and long from point in oracle?</p>
<p><strong>Like this:</strong></p>
<pre><code>MDSYS.SDO_GEOMETRY(2001,4326,NULL,
MDSYS.SDO_ELEM_INFO_ARRAY(1,1,1),
MDSYS.SDO_ORDINATE_ARRAY(51.702814,32.624736))
</code></pre>
| 45,480 | 3,026,997 | 2020-05-31 11:39:45 | 30,933,158 | 22 | 2015-06-19 08:10:26 | 2,895,087 | 2015-06-19 08:10:26 | https://stackoverflow.com/q/30908013 | https://stackoverflow.com/a/30933158 | <p>The notation you show is not the best one for representing single 2D or 3D points. The common and most efficient way to encode those points is this:</p>
<pre><code>SDO_GEOMETRY(2001,4326,SDO_POINT_TYPE(51.702814,32.624736,NULL),NULL,NULL)
</code></pre>
<p>All the GIS tools I have seen use this notation. The one yo... | <p>The notation you show is not the best one for representing single 2D or 3D points. The common and most efficient way to encode those points is this:</p> <pre><code>SDO_GEOMETRY(2001,4326,SDO_POINT_TYPE(51.702814,32.624736,NULL),NULL,NULL) </code></pre> <p>All the GIS tools I have seen use this notation. The one yo... | 20301, 25207, 165558 | latitude-longitude, oracle-database, oracle-spatial | <h1>How to get lat and long from sdo_geometry in oracle</h1>
<p>How can I get lat and long from point in oracle?</p>
<p><strong>Like this:</strong></p>
<pre><code>MDSYS.SDO_GEOMETRY(2001,4326,NULL,
MDSYS.SDO_ELEM_INFO_ARRAY(1,1,1),
MDSYS.SDO_ORDINATE_ARRAY(51.702814,32.624736))
</code></pre>
| q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 20,205 | git | # How to get lat and long from sdo_geometry in oracle
How can I get lat and long from point in oracle?
**Like this:**
```
MDSYS.SDO_GEOMETRY(2001,4326,NULL,
MDSYS.SDO_ELEM_INFO_ARRAY(1,1,1),
MDSYS.SDO_ORDINATE_ARRAY(51.702814,32.624736))
``` | The notation you show is not the best one for representing single 2D or 3D points. The common and most efficient way to encode those points is this:
```
SDO_GEOMETRY(2001,4326,SDO_POINT_TYPE(51.702814,32.624736,NULL),NULL,NULL)
```
All the GIS tools I have seen use this notation. The one you show is valid too - it ju... |
15732528 | git apply : error trailing whitespace | 12 | 2013-03-31 17:48:58 | <p>Lately, I've been playing a little bit with git. I'm trying to simulate to apply a patch to my master branch, this patch comprehends a commit where I added some comments to a java operation. I generated the patch using git <code>format-patch</code>. Then I switched to my master branch to apply the patch.
the followi... | 20,689 | 2,229,744 | 2013-06-27 08:55:46 | 17,338,798 | 22 | 2013-06-27 08:55:46 | 98,078 | 2013-06-27 08:55:46 | https://stackoverflow.com/q/15732528 | https://stackoverflow.com/a/17338798 | <p>If you are not concerned with applying trailing whitespaces to your repo you can use the flag <code>--whitespace=fix</code> to ignore the error and apply anyway</p>
<pre><code>git apply --whitespace=fix your.patch
</code></pre>
<p>I have heard some people say that the default is to warn and apply the patch, but th... | <p>If you are not concerned with applying trailing whitespaces to your repo you can use the flag <code>--whitespace=fix</code> to ignore the error and apply anyway</p> <pre><code>git apply --whitespace=fix your.patch </code></pre> <p>I have heard some people say that the default is to warn and apply the patch, but th... | 119, 2132 | git, patch | <h1>git apply : error trailing whitespace</h1>
<p>Lately, I've been playing a little bit with git. I'm trying to simulate to apply a patch to my master branch, this patch comprehends a commit where I added some comments to a java operation. I generated the patch using git <code>format-patch</code>. Then I switched to m... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 20,209 | git | # git apply : error trailing whitespace
Lately, I've been playing a little bit with git. I'm trying to simulate to apply a patch to my master branch, this patch comprehends a commit where I added some comments to a java operation. I generated the patch using git `format-patch`. Then I switched to my master branch to a... | If you are not concerned with applying trailing whitespaces to your repo you can use the flag `--whitespace=fix` to ignore the error and apply anyway
```
git apply --whitespace=fix your.patch
```
I have heard some people say that the default is to warn and apply the patch, but that has not been my experience and the ... |
15980102 | git pull options to prevent merge conflicts | 12 | 2013-04-12 20:13:51 | <p>Is there an option(s) when doing <code>git pull</code> that will not allow any possibility of a merge conflict? I've looked at the <a href="https://www.kernel.org/pub/software/scm/git/docs/v1.6.4.1/git-merge.html#_merge_strategies" rel="noreferrer">merge strategies</a> but none seem to meet this description. I'm loo... | 15,580 | 1,141,918 | 2017-06-12 01:08:57 | 15,986,145 | 22 | 2013-04-13 09:07:40 | 1,141,918 | 2014-08-22 16:22:52 | https://stackoverflow.com/q/15980102 | https://stackoverflow.com/a/15986145 | <p>What about:</p>
<pre><code>git pull --ff-only
</code></pre>
<p>If what has been said in the other answers is true, this should have exactly the desired effect. No?</p>
<p>The <code>--ff-only</code> flag stands for "fast-forward" which is how Git refers to a situation in which one of the merging branches contains... | <p>What about:</p> <pre><code>git pull --ff-only </code></pre> <p>If what has been said in the other answers is true, this should have exactly the desired effect. No?</p> <p>The <code>--ff-only</code> flag stands for "fast-forward" which is how Git refers to a situation in which one of the merging branches contains... | 119, 28897 | git, git-merge | <h1>git pull options to prevent merge conflicts</h1>
<p>Is there an option(s) when doing <code>git pull</code> that will not allow any possibility of a merge conflict? I've looked at the <a href="https://www.kernel.org/pub/software/scm/git/docs/v1.6.4.1/git-merge.html#_merge_strategies" rel="noreferrer">merge strategie... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 20,210 | git | # git pull options to prevent merge conflicts
Is there an option(s) when doing `git pull` that will not allow any possibility of a merge conflict? I've looked at the [merge strategies](https://www.kernel.org/pub/software/scm/git/docs/v1.6.4.1/git-merge.html#_merge_strategies) but none seem to meet this description. I'... | What about:
```
git pull --ff-only
```
If what has been said in the other answers is true, this should have exactly the desired effect. No?
The `--ff-only` flag stands for "fast-forward" which is how Git refers to a situation in which one of the merging branches contains all of the commits of the other ( a strict su... |
15845823 | git push error while pushing to remote repository | 12 | 2013-04-06 00:54:16 | <p>I am getting the following error while trying to push the changes to remote repository.</p>
<p><strong>Command</strong></p>
<p><code>git push heroku</code></p>
<p><strong>Error</strong></p>
<p><code>fatal: You are pushing to remote 'heroku', which is not the upstream of
your current branch 'master', without tell... | 15,711 | 392,233 | 2013-09-06 21:55:40 | 15,845,868 | 22 | 2013-04-06 01:00:33 | 999,165 | 2013-04-06 01:06:17 | https://stackoverflow.com/q/15845823 | https://stackoverflow.com/a/15845868 | <p>I suspect you don't have remote configured.</p>
<p>push likes to know WHAT to push and WHERE to push it. Usually one configures git so that it automatically tracks branches (local - remote pairs). </p>
<p>Try pushing: <code>git push heroku master</code> assuming master is your local branch and heroku is a remote.<... | <p>I suspect you don't have remote configured.</p> <p>push likes to know WHAT to push and WHERE to push it. Usually one configures git so that it automatically tracks branches (local - remote pairs). </p> <p>Try pushing: <code>git push heroku master</code> assuming master is your local branch and heroku is a remote.<... | 119, 8279 | git, heroku | <h1>git push error while pushing to remote repository</h1>
<p>I am getting the following error while trying to push the changes to remote repository.</p>
<p><strong>Command</strong></p>
<p><code>git push heroku</code></p>
<p><strong>Error</strong></p>
<p><code>fatal: You are pushing to remote 'heroku', which is not... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 20,211 | git | # git push error while pushing to remote repository
I am getting the following error while trying to push the changes to remote repository.
**Command**
`git push heroku`
**Error**
`fatal: You are pushing to remote 'heroku', which is not the upstream of
your current branch 'master', without telling me what to push
... | I suspect you don't have remote configured.
push likes to know WHAT to push and WHERE to push it. Usually one configures git so that it automatically tracks branches (local - remote pairs).
Try pushing: `git push heroku master` assuming master is your local branch and heroku is a remote.
Also, to see if remote is no... |
11014016 | git found out number of conflicts / list of conflicts in working folder | 12 | 2012-06-13 11:35:02 | <p>Is there any way to review list of conflicts (names of conflicting files and number of conflicts in it)?</p>
<p>The only thing I have discovered is to review pre-created <code>.git/MERGE_MSG</code> file... but this is not what I really searching for...</p>
| 5,428 | 1,047,741 | 2019-08-16 17:23:58 | 11,014,518 | 22 | 2012-06-13 12:08:32 | 220,155 | 2012-06-13 16:54:37 | https://stackoverflow.com/q/11014016 | https://stackoverflow.com/a/11014518 | <p><strong>Edit</strong>: Of course, the easy, obvious and over-engineering free answer is <code>git status</code>, as <a href="https://stackoverflow.com/users/720999/kostix">kostix</a> <a href="https://stackoverflow.com/a/11015036/220155">notes</a>. The disadvantage of this is that <code>git status</code> checks the s... | <p><strong>Edit</strong>: Of course, the easy, obvious and over-engineering free answer is <code>git status</code>, as <a href="https://stackoverflow.com/users/720999/kostix">kostix</a> <a href="https://stackoverflow.com/a/11015036/220155">notes</a>. The disadvantage of this is that <code>git status</code> checks the s... | 119, 3346 | dvcs, git | <h1>git found out number of conflicts / list of conflicts in working folder</h1>
<p>Is there any way to review list of conflicts (names of conflicting files and number of conflicts in it)?</p>
<p>The only thing I have discovered is to review pre-created <code>.git/MERGE_MSG</code> file... but this is not what I really... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 20,212 | git | # git found out number of conflicts / list of conflicts in working folder
Is there any way to review list of conflicts (names of conflicting files and number of conflicts in it)?
The only thing I have discovered is to review pre-created `.git/MERGE_MSG` file... but this is not what I really searching for... | **Edit**: Of course, the easy, obvious and over-engineering free answer is `git status`, as [kostix](https://stackoverflow.com/users/720999/kostix) [notes](https://stackoverflow.com/a/11015036/220155). The disadvantage of this is that `git status` checks the status of the index compared to the working copy, which is sl... |
3024404 | transform longitude latitude into meters | 12 | 2010-06-11 16:17:05 | <p>I need a function that maps gps positions to x/y values like this:</p>
<pre><code>getXYpos(GeoPoint relativeNullPoint, GeoPoint p){
deltaLatitude=p.latitude-relativeNullPoint.latitude;
deltaLongitude=p.longitude-relativeNullPoint.longitude;
...
resultX=latitude (or west to east) distance in meters from ... | 27,372 | 165,106 | 2016-08-22 17:59:34 | 3,024,728 | 22 | 2010-06-11 17:05:45 | 5,987 | 2016-08-22 17:59:34 | https://stackoverflow.com/q/3024404 | https://stackoverflow.com/a/3024728 | <p>To start with, I think you have your <a href="http://en.wikipedia.org/wiki/Latitude" rel="noreferrer">latitude</a> and <a href="http://en.wikipedia.org/wiki/Longitude" rel="noreferrer">longitude</a> reversed. Longitude measures X, and latitude measures Y.</p>
<p>The latitude is easy to turn into a north-south dista... | <p>To start with, I think you have your <a href="http://en.wikipedia.org/wiki/Latitude" rel="noreferrer">latitude</a> and <a href="http://en.wikipedia.org/wiki/Longitude" rel="noreferrer">longitude</a> reversed. Longitude measures X, and latitude measures Y.</p> <p>The latitude is easy to turn into a north-south dista... | 242, 20301, 24852 | coordinates, latitude-longitude, mapping | <h1>transform longitude latitude into meters</h1>
<p>I need a function that maps gps positions to x/y values like this:</p>
<pre><code>getXYpos(GeoPoint relativeNullPoint, GeoPoint p){
deltaLatitude=p.latitude-relativeNullPoint.latitude;
deltaLongitude=p.longitude-relativeNullPoint.longitude;
...
resultX=l... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 20,214 | git | # transform longitude latitude into meters
I need a function that maps gps positions to x/y values like this:
```
getXYpos(GeoPoint relativeNullPoint, GeoPoint p){
deltaLatitude=p.latitude-relativeNullPoint.latitude;
deltaLongitude=p.longitude-relativeNullPoint.longitude;
...
resultX=latitude (or west to ... | To start with, I think you have your [latitude](http://en.wikipedia.org/wiki/Latitude) and [longitude](http://en.wikipedia.org/wiki/Longitude) reversed. Longitude measures X, and latitude measures Y.
The latitude is easy to turn into a north-south distance. We know that 360 degrees is a full circle around the earth th... |
64221712 | Install Let's Encrypt for multiple domains on same server | 11 | 2020-10-06 08:03:54 | <p>I have a Digital Ocean Droplet and changed A-Records for 5 domains to point to the server.
I would like to install SSL (lets encrypt) for all 5 domains.
Is this possible?</p>
<p>I run this setup to backend identify the domain name and using this change the language.</p>
| 16,761 | 4,128,454 | 2026-01-16 15:27:45 | 64,221,787 | 22 | 2020-10-06 08:09:24 | 5,836,751 | 2026-01-16 15:27:45 | https://stackoverflow.com/q/64221712 | https://stackoverflow.com/a/64221787 | <p>Yes, it is.
It depends on what challenge you're going to use.
If you're using the certbot (which I can recommend!) you can simply append multiple domains with <code>-d</code></p>
<p>For example (you can even use wildcards):</p>
<pre><code>certbot -d 'domain1.tld,domain2.tld,domain3.tld,*.domain3.tld'
</code></pre>
<... | <p>Yes, it is. It depends on what challenge you're going to use. If you're using the certbot (which I can recommend!) you can simply append multiple domains with <code>-d</code></p> <p>For example (you can even use wildcards):</p> <pre><code>certbot -d 'domain1.tld,domain2.tld,domain3.tld,*.domain3.tld' </code></pre> <... | 641, 642, 97102, 116354 | digital-ocean, https, lets-encrypt, ssl | <h1>Install Let's Encrypt for multiple domains on same server</h1>
<p>I have a Digital Ocean Droplet and changed A-Records for 5 domains to point to the server.
I would like to install SSL (lets encrypt) for all 5 domains.
Is this possible?</p>
<p>I run this setup to backend identify the domain name and using this chan... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 20,217 | git | # Install Let's Encrypt for multiple domains on same server
I have a Digital Ocean Droplet and changed A-Records for 5 domains to point to the server.
I would like to install SSL (lets encrypt) for all 5 domains.
Is this possible?
I run this setup to backend identify the domain name and using this change the language... | Yes, it is.
It depends on what challenge you're going to use.
If you're using the certbot (which I can recommend!) you can simply append multiple domains with `-d`
For example (you can even use wildcards):
```
certbot -d 'domain1.tld,domain2.tld,domain3.tld,*.domain3.tld'
```
There is some good documentation on [Dig... |
60013299 | How to successfully exit "vimdiff" (which is used as a merge tool for "git") without saving? | 11 | 2020-02-01 01:44:24 | <p>I am new to this, so apologies about the basic question.</p>
<p>I am using an <strong>Ubuntu</strong> environment. I have <strong>git</strong> installed. I setup <strong>vimdiff</strong> as the merge tool.</p>
<p>I am testing the environment, but I am having a problem.</p>
<p>I created a conflict in a <code>readm... | 11,078 | 1,795,917 | 2023-01-29 09:51:46 | 60,026,847 | 22 | 2020-02-02 14:04:05 | 4,400,820 | 2021-05-26 23:59:47 | https://stackoverflow.com/q/60013299 | https://stackoverflow.com/a/60026847 | <p>Use <code>:cquit</code>, or <code>git merge --abort</code> and do the merge again.</p>
| <p>Use <code>:cquit</code>, or <code>git merge --abort</code> and do the merge again.</p> | 119, 370, 549, 717, 2605 | git, merge, ubuntu, vim, vimdiff | <h1>How to successfully exit "vimdiff" (which is used as a merge tool for "git") without saving?</h1>
<p>I am new to this, so apologies about the basic question.</p>
<p>I am using an <strong>Ubuntu</strong> environment. I have <strong>git</strong> installed. I setup <strong>vimdiff</strong> as the merge tool.</p>
<p>... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 20,218 | git | # How to successfully exit "vimdiff" (which is used as a merge tool for "git") without saving?
I am new to this, so apologies about the basic question.
I am using an **Ubuntu** environment. I have **git** installed. I setup **vimdiff** as the merge tool.
I am testing the environment, but I am having a problem.
I cr... | Use `:cquit`, or `git merge --abort` and do the merge again. |
44817685 | Delete stashed changes older than X days | 11 | 2017-06-29 06:19:47 | <p>How could I delete all stashes older than X days?</p>
<p>I use <code>git stash</code> in my everyday workflow, which means I end up with months of old stashes. </p>
| 1,832 | 225,813 | 2017-06-29 15:37:14 | 44,829,516 | 22 | 2017-06-29 15:37:14 | 1,256,452 | 2017-06-29 15:37:14 | https://stackoverflow.com/q/44817685 | https://stackoverflow.com/a/44829516 | <h3>Use <code>git reflog expire</code> manually</h3>
<p>The underlying mechanism for "pushed" stashes—i.e., any stash whose name is not just <code>stash</code> or <code>stash@{0}</code>, but rather <code>stash@{1}</code>, <code>stash@{2}</code>, and so on—is Git's <em>reflogs</em>. The reflog records the <em>previous... | <h3>Use <code>git reflog expire</code> manually</h3> <p>The underlying mechanism for "pushed" stashes—i.e., any stash whose name is not just <code>stash</code> or <code>stash@{0}</code>, but rather <code>stash@{1}</code>, <code>stash@{2}</code>, and so on—is Git's <em>reflogs</em>. The reflog records the <em>previous... | 119 | git | <h1>Delete stashed changes older than X days</h1>
<p>How could I delete all stashes older than X days?</p>
<p>I use <code>git stash</code> in my everyday workflow, which means I end up with months of old stashes. </p>
| q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 20,219 | git | # Delete stashed changes older than X days
How could I delete all stashes older than X days?
I use `git stash` in my everyday workflow, which means I end up with months of old stashes. | ### Use `git reflog expire` manually
The underlying mechanism for "pushed" stashes—i.e., any stash whose name is not just `stash` or `stash@{0}`, but rather `stash@{1}`, `stash@{2}`, and so on—is Git's *reflogs*. The reflog records the *previous value* of a reference, whenever the reference changes. (I'll define *refe... |
39433480 | Dockerfile versioning best practice | 11 | 2016-09-11 06:35:10 | <p>We are a few developers currently developing a C++ app.</p>
<p>In order to be sure that everyone use the same libraries and dependencies than the remote production server, we are using docker to compile the code source in our localhost.</p>
<p>My question is what the best practices to use git with docker?</p>
<ol... | 9,656 | 1,538,434 | 2017-06-21 14:37:32 | 39,433,993 | 22 | 2016-09-11 07:55:18 | 1,556,338 | 2016-09-11 08:52:40 | https://stackoverflow.com/q/39433480 | https://stackoverflow.com/a/39433993 | <p>Keep your Dockerfile with the source code. We use labels to add versioning info to the produced image. We add:</p>
<ul>
<li>the git commit and branch</li>
<li>whether it's "dirty" meaning that changes were made locally on the src code from what's in git</li>
<li>a CI version number (publicly visible)</li>
<li>the p... | <p>Keep your Dockerfile with the source code. We use labels to add versioning info to the produced image. We add:</p> <ul> <li>the git commit and branch</li> <li>whether it's "dirty" meaning that changes were made locally on the src code from what's in git</li> <li>a CI version number (publicly visible)</li> <li>the p... | 119, 90304, 111433 | devops, docker, git | <h1>Dockerfile versioning best practice</h1>
<p>We are a few developers currently developing a C++ app.</p>
<p>In order to be sure that everyone use the same libraries and dependencies than the remote production server, we are using docker to compile the code source in our localhost.</p>
<p>My question is what the be... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 20,221 | git | # Dockerfile versioning best practice
We are a few developers currently developing a C++ app.
In order to be sure that everyone use the same libraries and dependencies than the remote production server, we are using docker to compile the code source in our localhost.
My question is what the best practices to use git... | Keep your Dockerfile with the source code. We use labels to add versioning info to the produced image. We add:
- the git commit and branch
- whether it's "dirty" meaning that changes were made locally on the src code from what's in git
- a CI version number (publicly visible)
- the person who built the image (not the ... |
33806068 | git log format: shift commit body X columns to the right | 11 | 2015-11-19 14:03:04 | <p>I'm using the following custom log format to view my commits:</p>
<p>Command: <code>git log --pretty=format:"%C(auto)%h %<(8,trunc)%aN %Cgreen%s %+b"</code></p>
<pre><code>3758d35 Daniel This commit does nothing
You really should remove it before commiting.
1. This is a line
2. This is another line
... | 2,846 | 1,345,847 | 2023-05-09 04:38:24 | 33,807,182 | 22 | 2015-11-19 14:53:12 | 5,529,678 | 2023-05-09 04:38:24 | https://stackoverflow.com/q/33806068 | https://stackoverflow.com/a/33807182 | <p>You can use <code>%w(<your max line width>,<first line indent>,<second line indent>)</code> in front of the message body, e.g.</p>
<p><code>%w(64,16,16)%b</code></p>
<p>From <a href="https://git-scm.com/docs/pretty-formats#Documentation/pretty-formats.txt-emwltwgtlti1gtlti2gtem" rel="noreferrer">pr... | <p>You can use <code>%w(<your max line width>,<first line indent>,<second line indent>)</code> in front of the message body, e.g.</p> <p><code>%w(64,16,16)%b</code></p> <p>From <a href="https://git-scm.com/docs/pretty-formats#Documentation/pretty-formats.txt-emwltwgtlti1gtlti2gtem" rel="noreferrer">pr... | 119, 245 | format, git | <h1>git log format: shift commit body X columns to the right</h1>
<p>I'm using the following custom log format to view my commits:</p>
<p>Command: <code>git log --pretty=format:"%C(auto)%h %<(8,trunc)%aN %Cgreen%s %+b"</code></p>
<pre><code>3758d35 Daniel This commit does nothing
You really should remove it bef... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 20,222 | git | # git log format: shift commit body X columns to the right
I'm using the following custom log format to view my commits:
Command: `git log --pretty=format:"%C(auto)%h %<(8,trunc)%aN %Cgreen%s %+b"`
```
3758d35 Daniel This commit does nothing
You really should remove it before commiting.
1. This is a line
... | You can use `%w(<your max line width>,<first line indent>,<second line indent>)` in front of the message body, e.g.
`%w(64,16,16)%b`
From [pretty format documentation](https://git-scm.com/docs/pretty-formats#Documentation/pretty-formats.txt-emwltwgtlti1gtlti2gtem):
> `%w([<w>[,<i1>[,<i2>]]])`
>
> switch line wrappin... |
28644968 | How can i configure font size in gitk? | 11 | 2015-02-21 10:58:56 | <p>Using Linux, how can i configure font and font size in gitk?</p>
<p>Looking through the menus can be quite frustrating as they offer very little configuration possibilities.</p>
| 6,119 | 3,545,094 | 2022-02-13 20:38:08 | 28,644,969 | 22 | 2015-02-21 10:58:56 | 3,545,094 | 2022-02-13 20:38:08 | https://stackoverflow.com/q/28644968 | https://stackoverflow.com/a/28644969 | <p>You can <a href="https://git-scm.com/docs/gitk#_files" rel="nofollow noreferrer">configure</a> the font and font size in either:</p>
<ul>
<li><code>~/.config/git/gitk</code> or</li>
<li><code>~/.gitk</code></li>
</ul>
<p>Example:</p>
<pre class="lang-sh prettyprint-override"><code>set mainfont {Monaco 10}
set textfo... | <p>You can <a href="https://git-scm.com/docs/gitk#_files" rel="nofollow noreferrer">configure</a> the font and font size in either:</p> <ul> <li><code>~/.config/git/gitk</code> or</li> <li><code>~/.gitk</code></li> </ul> <p>Example:</p> <pre class="lang-sh prettyprint-override"><code>set mainfont {Monaco 10} set textfo... | 58, 119, 30785 | git, gitk, linux | <h1>How can i configure font size in gitk?</h1>
<p>Using Linux, how can i configure font and font size in gitk?</p>
<p>Looking through the menus can be quite frustrating as they offer very little configuration possibilities.</p>
| q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 20,223 | git | # How can i configure font size in gitk?
Using Linux, how can i configure font and font size in gitk?
Looking through the menus can be quite frustrating as they offer very little configuration possibilities. | You can [configure](https://git-scm.com/docs/gitk#_files) the font and font size in either:
- `~/.config/git/gitk` or
- `~/.gitk`
Example:
```
set mainfont {Monaco 10}
set textfont {Monaco 10}
set uifont {Monaco 10}
```
You can also do it through the tool itself:
1. Open menu `Edit/Preferences`
2. Click `Fonts`
3.... |
27109525 | How do I install git-subtree with Cygwin in Windows 7? | 11 | 2014-11-24 16:30:15 | <p>I'm struggling to install git-subtree with Cygwin and there hasn't been any good tutorials online focused on building from source in Windows. Have you ever had this issue, and what is the best strategy to tackle it?</p>
| 3,023 | 2,204,868 | 2017-09-19 21:33:27 | 27,116,828 | 22 | 2014-11-25 00:36:03 | 1,002,260 | 2017-04-25 15:12:57 | https://stackoverflow.com/q/27109525 | https://stackoverflow.com/a/27116828 | <p><code>git-subtree</code> is not part of a package. However, like <code>gitk</code> you can manually
install it</p>
<pre>
wget <a href="http://rawgit.com/git/git/master/contrib/subtree/git-subtree.sh" rel="nofollow noreferrer">rawgit.com/git/git/master/contrib/subtree/git-subtree.sh</a>
install git-subtree.sh /bin/g... | <p><code>git-subtree</code> is not part of a package. However, like <code>gitk</code> you can manually install it</p> <pre> wget <a href="http://rawgit.com/git/git/master/contrib/subtree/git-subtree.sh" rel="nofollow noreferrer">rawgit.com/git/git/master/contrib/subtree/git-subtree.sh</a> install git-subtree.sh /bin/g... | 64, 119, 1731, 68200 | cygwin, git, git-subtree, windows | <h1>How do I install git-subtree with Cygwin in Windows 7?</h1>
<p>I'm struggling to install git-subtree with Cygwin and there hasn't been any good tutorials online focused on building from source in Windows. Have you ever had this issue, and what is the best strategy to tackle it?</p>
| q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 20,224 | git | # How do I install git-subtree with Cygwin in Windows 7?
I'm struggling to install git-subtree with Cygwin and there hasn't been any good tutorials online focused on building from source in Windows. Have you ever had this issue, and what is the best strategy to tackle it? | `git-subtree` is not part of a package. However, like `gitk` you can manually
install it
```
wget rawgit.com/git/git/master/contrib/subtree/git-subtree.sh
install git-subtree.sh /bin/git-subtree
``` |
24868556 | How to go back to the results of :Gblame after selecting a particular commit? | 11 | 2014-07-21 15:10:34 | <p>From the README of the <a href="https://github.com/tpope/vim-fugitive" rel="noreferrer">fugitive</a> plugin for vim:</p>
<blockquote>
<p>:Gblame brings up an interactive vertical split with git blame output.
Press enter on a line to edit the commit where the line changed, or o
to open it in a split.</p>
</blo... | 6,570 | 275,088 | 2021-05-25 05:49:15 | 24,869,329 | 22 | 2014-07-21 15:52:35 | 3,850,702 | 2014-07-22 16:39:22 | https://stackoverflow.com/q/24868556 | https://stackoverflow.com/a/24869329 | <p><strike>I think what you may be looking for is <code>-</code> </strike> </p>
Edit: What you actually want are <code>O</code> and <code>o</code> instead of <code><CR></code> if you know you will be going back to the commit.</p>
<p>Here are all the flags for the <code>:Gblame</code> command:</p>
<blockquote>
<... | <p><strike>I think what you may be looking for is <code>-</code> </strike> </p> Edit: What you actually want are <code>O</code> and <code>o</code> instead of <code><CR></code> if you know you will be going back to the commit.</p> <p>Here are all the flags for the <code>:Gblame</code> command:</p> <blockquote> <... | 119, 370, 39462, 105902 | git, git-blame, vim, vim-plugin | <h1>How to go back to the results of :Gblame after selecting a particular commit?</h1>
<p>From the README of the <a href="https://github.com/tpope/vim-fugitive" rel="noreferrer">fugitive</a> plugin for vim:</p>
<blockquote>
<p>:Gblame brings up an interactive vertical split with git blame output.
Press enter on a ... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 20,225 | git | # How to go back to the results of :Gblame after selecting a particular commit?
From the README of the [fugitive](https://github.com/tpope/vim-fugitive) plugin for vim:
> :Gblame brings up an interactive vertical split with git blame output.
> Press enter on a line to edit the commit where the line changed, or o
> to... | I think what you may be looking for is `-`
Edit: What you actually want are `O` and `o` instead of `<CR>` if you know you will be going back to the commit.
Here are all the flags for the `:Gblame` command:
> ```
> *fugitive-:Gblame*
> :Gblame [flags]
> Run git-blame on th... |
19105934 | git push branch to a new repo with a different name | 11 | 2013-10-01 00:12:22 | <p>How can I push a branch to a different repo with a new name for the branch.</p>
<p>For instance I have a branch <code>feature1</code> on repo <code>abc</code> and I'd like to push to repo <code>xyz</code> and make it the master branch.</p>
<p>I tried using <a href="https://stackoverflow.com/questions/7084273/renam... | 12,293 | 351,614 | 2013-10-01 00:43:32 | 19,106,185 | 22 | 2013-10-01 00:43:32 | 50,979 | 2013-10-01 00:43:32 | https://stackoverflow.com/q/19105934 | https://stackoverflow.com/a/19106185 | <p>I think this should work:</p>
<pre><code>git push xyz feature1:master
</code></pre>
<p>If master already exists, you can clobber it with <code>-f/--force</code>, or <code>+</code>:</p>
<pre><code>git push -f xyz feature1:master
git push xyz +feature1:master
</code></pre>
<p>From the man page (in the examples... | <p>I think this should work:</p> <pre><code>git push xyz feature1:master </code></pre> <p>If master already exists, you can clobber it with <code>-f/--force</code>, or <code>+</code>:</p> <pre><code>git push -f xyz feature1:master git push xyz +feature1:master </code></pre> <p>From the man page (in the examples... | 119, 1879 | branch, git | <h1>git push branch to a new repo with a different name</h1>
<p>How can I push a branch to a different repo with a new name for the branch.</p>
<p>For instance I have a branch <code>feature1</code> on repo <code>abc</code> and I'd like to push to repo <code>xyz</code> and make it the master branch.</p>
<p>I tried usi... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 20,226 | git | # git push branch to a new repo with a different name
How can I push a branch to a different repo with a new name for the branch.
For instance I have a branch `feature1` on repo `abc` and I'd like to push to repo `xyz` and make it the master branch.
I tried using [Renaming remote git branch](https://stackoverflow.co... | I think this should work:
```
git push xyz feature1:master
```
If master already exists, you can clobber it with `-f/--force`, or `+`:
```
git push -f xyz feature1:master
git push xyz +feature1:master
```
From the man page (in the examples section at the end):
> ```
> git push origin +dev:master
> Up... |
18570982 | IntelliJ error: branch 'origin/HEAD' does not point at a commit, some refs could not be read | 11 | 2013-09-02 10:28:44 | <p>As far as I can tell everything in my git local repository is fine. I can commit, push, pull, whatever I like.</p>
<p>However, when I view the details of a commit in the IntelliJ log, the <code>Contained in branches:</code></p>
<pre><code>Can not load branches due to error:
error: branch 'origin/HEAD' does not poi... | 4,994 | 297,331 | 2015-10-16 06:40:20 | 18,575,284 | 22 | 2013-09-02 14:16:22 | null | 2015-10-16 06:40:20 | https://stackoverflow.com/q/18570982 | https://stackoverflow.com/a/18575284 | <p><code>origin/head</code> sounds like it refers to the default branch set in your remote origin repo. For example, when I do <code>git branch -a</code>, I see this show up in the list:</p>
<pre><code>remotes/origin/HEAD -> origin/master
</code></pre>
<p>You might be missing this reference in your local repo, or ... | <p><code>origin/head</code> sounds like it refers to the default branch set in your remote origin repo. For example, when I do <code>git branch -a</code>, I see this show up in the list:</p> <pre><code>remotes/origin/HEAD -> origin/master </code></pre> <p>You might be missing this reference in your local repo, or ... | 119, 8945 | git, intellij-idea | <h1>IntelliJ error: branch 'origin/HEAD' does not point at a commit, some refs could not be read</h1>
<p>As far as I can tell everything in my git local repository is fine. I can commit, push, pull, whatever I like.</p>
<p>However, when I view the details of a commit in the IntelliJ log, the <code>Contained in branche... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 20,227 | git | # IntelliJ error: branch 'origin/HEAD' does not point at a commit, some refs could not be read
As far as I can tell everything in my git local repository is fine. I can commit, push, pull, whatever I like.
However, when I view the details of a commit in the IntelliJ log, the `Contained in branches:`
```
Can not load... | `origin/head` sounds like it refers to the default branch set in your remote origin repo. For example, when I do `git branch -a`, I see this show up in the list:
```
remotes/origin/HEAD -> origin/master
```
You might be missing this reference in your local repo, or your local repo's reference might be out of date, if... |
10704922 | Move modifications made in develop branch into a new git-flow feature branch? | 11 | 2012-05-22 15:15:54 | <p>I'm using git-flow for my projects, and have started a rather complicated set of changes in the develop branch, which appear to take longer than I expected first. </p>
<p>I wish I had done this in a feature branch, since I'd like to make a new release with other changes. How can I move these uncommitted changes int... | 3,767 | 1,982,991 | 2013-11-11 16:11:16 | 10,711,111 | 22 | 2012-05-22 22:35:49 | 761,202 | 2013-11-11 16:11:16 | https://stackoverflow.com/q/10704922 | https://stackoverflow.com/a/10711111 | <p><strong>If you've made no commits</strong></p>
<p>If you simply have a dirty working copy, just act like you are about to start a new feature:</p>
<pre><code>git flow feature start awesomeness
git commit -va
</code></pre>
<p><strong>If you <em>did</em> make some commits</strong></p>
<p>If there are commits in de... | <p><strong>If you've made no commits</strong></p> <p>If you simply have a dirty working copy, just act like you are about to start a new feature:</p> <pre><code>git flow feature start awesomeness git commit -va </code></pre> <p><strong>If you <em>did</em> make some commits</strong></p> <p>If there are commits in de... | 119, 64339 | git, git-flow | <h1>Move modifications made in develop branch into a new git-flow feature branch?</h1>
<p>I'm using git-flow for my projects, and have started a rather complicated set of changes in the develop branch, which appear to take longer than I expected first. </p>
<p>I wish I had done this in a feature branch, since I'd like... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 20,228 | git | # Move modifications made in develop branch into a new git-flow feature branch?
I'm using git-flow for my projects, and have started a rather complicated set of changes in the develop branch, which appear to take longer than I expected first.
I wish I had done this in a feature branch, since I'd like to make a new re... | **If you've made no commits**
If you simply have a dirty working copy, just act like you are about to start a new feature:
```
git flow feature start awesomeness
git commit -va
```
**If you *did* make some commits**
If there are commits in develop that should have been in your feature branch, the above steps are th... |
53233810 | Generating release notes from git commits | 10 | 2018-11-09 22:01:54 | <p>I've created the following rake task below to generate our release notes for each sprint.<br>
I'm pulling in all commits to <code>master</code> older than 2 weeks. </p>
<p>The problem is when a branch has been developed on for more than 2-week sprints, the older commits won't be included. </p>
<p>Can anyone sugg... | 24,340 | 6,013,582 | 2018-11-10 10:45:46 | 53,234,376 | 22 | 2018-11-09 23:05:00 | 1,755,598 | 2018-11-10 07:48:48 | https://stackoverflow.com/q/53233810 | https://stackoverflow.com/a/53234376 | <blockquote>
<p>Can anyone suggest a way I can get these commits in?</p>
</blockquote>
<p>Few options:</p>
<ol>
<li><code>git tag</code></li>
<li><code>git notes</code></li>
<li><code>git whatchanged</code></li>
</ol>
<hr>
<h3><code>git tag</code></h3>
<p>Read this answer on what is git tag and how to use it: <a... | <blockquote> <p>Can anyone suggest a way I can get these commits in?</p> </blockquote> <p>Few options:</p> <ol> <li><code>git tag</code></li> <li><code>git notes</code></li> <li><code>git whatchanged</code></li> </ol> <hr> <h3><code>git tag</code></h3> <p>Read this answer on what is git tag and how to use it: <a... | 12, 119, 650 | git, rake, ruby | <h1>Generating release notes from git commits</h1>
<p>I've created the following rake task below to generate our release notes for each sprint.<br>
I'm pulling in all commits to <code>master</code> older than 2 weeks. </p>
<p>The problem is when a branch has been developed on for more than 2-week sprints, the older c... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 20,230 | git | # Generating release notes from git commits
I've created the following rake task below to generate our release notes for each sprint.
I'm pulling in all commits to `master` older than 2 weeks.
The problem is when a branch has been developed on for more than 2-week sprints, the older commits won't be included.
Can ... | > Can anyone suggest a way I can get these commits in?
Few options:
1. `git tag`
2. `git notes`
3. `git whatchanged`
---
### `git tag`
Read this answer on what is git tag and how to use it: [What is git tag, How to create tags & How to checkout git remote tag(s)](https://stackoverflow.com/questions/35979642/what-i... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.