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
46553101
git clone fails with "fatal: Out of memory, malloc failed" error
11
2017-10-03 20:43:30
<p>When I perform a <strong>git clone</strong> from a <strong>bare repository</strong> of my project, on a local server, I get following error message:</p> <blockquote> <p>fatal: <strong>Out of memory, malloc failed</strong> (tried to allocate 2251896833 bytes) warning: Clone succeeded, but checkout failed. You ca...
19,272
5,399,268
2024-09-10 13:40:44
46,557,423
12
2017-10-04 05:10:11
6,501,141
2017-10-04 05:10:11
https://stackoverflow.com/q/46553101
https://stackoverflow.com/a/46557423
<p>Using the fact that a Git repo is self-contained and can just be copied, we only need some way to make a copy and convert from bare to non-bare for our first few attempts.</p> <p>Cloning is still the best form of initial copying, if that option is possible (see work-arounds 1 and 2). If not, we can just straight c...
<p>Using the fact that a Git repo is self-contained and can just be copied, we only need some way to make a copy and convert from bare to non-bare for our first few attempts.</p> <p>Cloning is still the best form of initial copying, if that option is possible (see work-arounds 1 and 2). If not, we can just straight c...
61, 119, 34099
git, git-clone, memory
<h1>git clone fails with "fatal: Out of memory, malloc failed" error</h1> <p>When I perform a <strong>git clone</strong> from a <strong>bare repository</strong> of my project, on a local server, I get following error message:</p> <blockquote> <p>fatal: <strong>Out of memory, malloc failed</strong> (tried to allocate...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
23,013
git
# git clone fails with "fatal: Out of memory, malloc failed" error When I perform a **git clone** from a **bare repository** of my project, on a local server, I get following error message: > fatal: **Out of memory, malloc failed** (tried to allocate 2251896833 > bytes) warning: Clone succeeded, but checkout failed. ...
Using the fact that a Git repo is self-contained and can just be copied, we only need some way to make a copy and convert from bare to non-bare for our first few attempts. Cloning is still the best form of initial copying, if that option is possible (see work-arounds 1 and 2). If not, we can just straight copy from th...
40252440
git status vs git status -u vs git status -uno
11
2016-10-26 01:49:13
<p>I am slightly confused by the documentation. Kindly, correct me.</p> <p><code>git status</code> - show the current local working directory status</p> <p><code>git status -u</code> - show untracked files (also local)</p> <p><code>git status -uno</code> - show no untracked files (also local) ?? </p> <p>I don't und...
6,243
3,534,132
2016-10-26 02:43:31
40,252,494
12
2016-10-26 01:56:18
1,256,452
2016-10-26 02:43:31
https://stackoverflow.com/q/40252440
https://stackoverflow.com/a/40252494
<p>The <code>-u</code> or <code>--untracked-files=</code> flag to <code>git status</code> takes an additional parameter that is one of three values:</p> <ul> <li><code>no</code>: do not show untracked files</li> <li><code>normal</code>: show untracked files and directories</li> <li><code>all</code>: a more-verbose var...
<p>The <code>-u</code> or <code>--untracked-files=</code> flag to <code>git status</code> takes an additional parameter that is one of three values:</p> <ul> <li><code>no</code>: do not show untracked files</li> <li><code>normal</code>: show untracked files and directories</li> <li><code>all</code>: a more-verbose var...
119
git
<h1>git status vs git status -u vs git status -uno</h1> <p>I am slightly confused by the documentation. Kindly, correct me.</p> <p><code>git status</code> - show the current local working directory status</p> <p><code>git status -u</code> - show untracked files (also local)</p> <p><code>git status -uno</code> - show...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
23,014
git
# git status vs git status -u vs git status -uno I am slightly confused by the documentation. Kindly, correct me. `git status` - show the current local working directory status `git status -u` - show untracked files (also local) `git status -uno` - show no untracked files (also local) ?? I don't understand the las...
The `-u` or `--untracked-files=` flag to `git status` takes an additional parameter that is one of three values: - `no`: do not show untracked files - `normal`: show untracked files and directories - `all`: a more-verbose variant of `normal` Omitting the additional word means the same as using `-unormal` (or `--untra...
34849144
How can I push specific commit to a remote, without the previous commits?
11
2016-01-18 07:18:48
<p>I committed code in local repository 2 or more times using</p> <pre class="lang-bash prettyprint-override"><code>git commit -m &quot;message 1&quot; git commit -m &quot;message 2&quot; git commit -m &quot;message 3&quot; </code></pre> <p>Now I have three commits with following SHA</p> <pre><code>commit-1 SHA1 commit...
24,880
1,307,324
2023-08-04 22:21:04
34,849,313
12
2016-01-18 07:30:41
6,309
2023-08-04 22:18:37
https://stackoverflow.com/q/34849144
https://stackoverflow.com/a/34849313
<p>You need to <a href="https://git-scm.com/docs/git-rebase" rel="nofollow noreferrer"><code>git rebase -i</code></a> your branch first, in order to make commit2 the first commit after <code>origin/yourBranch</code>.</p> <pre><code> x--x--C1--C2--C3 (B) | (origin/B) git rebase -i C1~ x--x--C2'--C1'--C3' (B) ...
<p>You need to <a href="https://git-scm.com/docs/git-rebase" rel="nofollow noreferrer"><code>git rebase -i</code></a> your branch first, in order to make commit2 the first commit after <code>origin/yourBranch</code>.</p> <pre><code> x--x--C1--C2--C3 (B) | (origin/B) git rebase -i C1~ x--x--C2'--C1'--C3' (B) ...
119
git
<h1>How can I push specific commit to a remote, without the previous commits?</h1> <p>I committed code in local repository 2 or more times using</p> <pre class="lang-bash prettyprint-override"><code>git commit -m &quot;message 1&quot; git commit -m &quot;message 2&quot; git commit -m &quot;message 3&quot; </code></pre>...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
23,015
git
# How can I push specific commit to a remote, without the previous commits? I committed code in local repository 2 or more times using ``` git commit -m "message 1" git commit -m "message 2" git commit -m "message 3" ``` Now I have three commits with following SHA ``` commit-1 SHA1 commit-2 SHA2 commit-3 SHA3 ``` ...
You need to [`git rebase -i`](https://git-scm.com/docs/git-rebase) your branch first, in order to make commit2 the first commit after `origin/yourBranch`. ``` x--x--C1--C2--C3 (B) | (origin/B) git rebase -i C1~ x--x--C2'--C1'--C3' (B) | (origin/B) ``` Then you can push that commit. See "[git - pushin...
25995863
Apache and git-http-backend
11
2014-09-23 13:04:02
<p>I am currently setting up some git repositories on a Ubuntu LTS 14.04 machine with Apache 2.4.7. </p> <p>This is the apache config:</p> <pre><code>SetEnv GIT_PROJECT_ROOT /var/www/html/git SetEnv GIT_HTTP_EXPORT_ALL 1 SetEnv REMOTE_USER $REDIRECT_REMOTE_USER ScriptAliasMatch \ "(?x)^/git/(.*/(HEAD | \ ...
14,390
1,520,657
2018-06-21 18:04:31
26,763,439
12
2014-11-05 17:29:43
278,810
2014-11-05 17:29:43
https://stackoverflow.com/q/25995863
https://stackoverflow.com/a/26763439
<p>Is Apache's CGI module enabled? Try running <code>sudo a2enmod cgi</code> and then restarting Apache.</p> <p>I had the exact same issue, which ended up being caused by the fact that the CGI module was disabled. In my case, the above command picked and enabled the "cgid" module.</p> <p>I believe you need the traili...
<p>Is Apache's CGI module enabled? Try running <code>sudo a2enmod cgi</code> and then restarting Apache.</p> <p>I had the exact same issue, which ended up being caused by the fact that the CGI module was disabled. In my case, the above command picked and enabled the "cgid" module.</p> <p>I believe you need the traili...
80, 119, 124638
apache, git, git-http-backend
<h1>Apache and git-http-backend</h1> <p>I am currently setting up some git repositories on a Ubuntu LTS 14.04 machine with Apache 2.4.7. </p> <p>This is the apache config:</p> <pre><code>SetEnv GIT_PROJECT_ROOT /var/www/html/git SetEnv GIT_HTTP_EXPORT_ALL 1 SetEnv REMOTE_USER $REDIRECT_REMOTE_USER ScriptAliasMatch \ ...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
23,017
git
# Apache and git-http-backend I am currently setting up some git repositories on a Ubuntu LTS 14.04 machine with Apache 2.4.7. This is the apache config: ``` SetEnv GIT_PROJECT_ROOT /var/www/html/git SetEnv GIT_HTTP_EXPORT_ALL 1 SetEnv REMOTE_USER $REDIRECT_REMOTE_USER ScriptAliasMatch \ "(?x)^/git/(.*/(HEAD | \...
Is Apache's CGI module enabled? Try running `sudo a2enmod cgi` and then restarting Apache. I had the exact same issue, which ended up being caused by the fact that the CGI module was disabled. In my case, the above command picked and enabled the "cgid" module. I believe you need the trailing `$1` if you're using `Scr...
26683792
How can I find empty git commits?
11
2014-10-31 21:40:58
<p>What command(s) can I use to find empty commits in a git repository, i.e. the commits that would be removed by <code>git filter-branch --prune-empty</code>?</p>
4,721
244,297
2023-07-31 09:23:54
26,691,249
12
2014-11-01 17:50:48
4,021,077
2014-11-01 17:50:48
https://stackoverflow.com/q/26683792
https://stackoverflow.com/a/26691249
<p>You'd want to exclude parentless commits and merge commits, then see which ones have the same tree as their parent.</p> <pre><code>for sha in $(git rev-list --min-parents=1 --max-parents=1 --all) do if [ $(git rev-parse ${sha}^{tree}) == $(git rev-parse ${sha}^1^{tree} ) ] then echo "${sha} will be pru...
<p>You'd want to exclude parentless commits and merge commits, then see which ones have the same tree as their parent.</p> <pre><code>for sha in $(git rev-list --min-parents=1 --max-parents=1 --all) do if [ $(git rev-parse ${sha}^{tree}) == $(git rev-parse ${sha}^1^{tree} ) ] then echo "${sha} will be pru...
119, 46509
git, git-filter-branch
<h1>How can I find empty git commits?</h1> <p>What command(s) can I use to find empty commits in a git repository, i.e. the commits that would be removed by <code>git filter-branch --prune-empty</code>?</p>
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
23,018
git
# How can I find empty git commits? What command(s) can I use to find empty commits in a git repository, i.e. the commits that would be removed by `git filter-branch --prune-empty`?
You'd want to exclude parentless commits and merge commits, then see which ones have the same tree as their parent. ``` for sha in $(git rev-list --min-parents=1 --max-parents=1 --all) do if [ $(git rev-parse ${sha}^{tree}) == $(git rev-parse ${sha}^1^{tree} ) ] then echo "${sha} will be pruned" fi don...
25212573
Is there a way to recover a commit that was accidentally skipped during a rebase?
11
2014-08-08 21:34:10
<p>When it happens that a useful commit is accidentally skipped during a rebase operation, is there any hope that Git keeps a reference of it that could be reapplied?</p> <p>It was a non-interactive rebase with lots of binary files where I went too long into a happy-trigger mood using <code>git rebase --skip</code>, s...
3,375
325,667
2014-08-09 19:18:55
25,222,144
12
2014-08-09 19:18:55
1,256,452
2014-08-09 19:18:55
https://stackoverflow.com/q/25212573
https://stackoverflow.com/a/25222144
<p>When you run <code>git rebase</code> (interactive or not), git basically does a series of <code>cherry-pick</code> operations to copy your original commit-chain to a new chain. Let's use <code>o</code> for the original commits, and draw the commit-graph fragment for branch <code>branch</code> coming off branch <cod...
<p>When you run <code>git rebase</code> (interactive or not), git basically does a series of <code>cherry-pick</code> operations to copy your original commit-chain to a new chain. Let's use <code>o</code> for the original commits, and draw the commit-graph fragment for branch <code>branch</code> coming off branch <cod...
119, 29934
git, git-rebase
<h1>Is there a way to recover a commit that was accidentally skipped during a rebase?</h1> <p>When it happens that a useful commit is accidentally skipped during a rebase operation, is there any hope that Git keeps a reference of it that could be reapplied?</p> <p>It was a non-interactive rebase with lots of binary fi...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
23,019
git
# Is there a way to recover a commit that was accidentally skipped during a rebase? When it happens that a useful commit is accidentally skipped during a rebase operation, is there any hope that Git keeps a reference of it that could be reapplied? It was a non-interactive rebase with lots of binary files where I went...
When you run `git rebase` (interactive or not), git basically does a series of `cherry-pick` operations to copy your original commit-chain to a new chain. Let's use `o` for the original commits, and draw the commit-graph fragment for branch `branch` coming off branch `main`: ``` o1 - o2 - o3 - o4 <-- branch ...
17176859
Amending a pushed commit message
11
2013-06-18 19:04:24
<p>I just made pushed a commit, then realized I needed to change the commit message. </p> <p>So on my local repo I did:</p> <pre><code>git commit --amend -m "New commit message" </code></pre> <p>But when I then tried to push this, I got loads of error messages saying</p> <pre><code>Updates were rejected because the...
5,945
938,548
2023-03-10 13:18:18
17,176,929
12
2013-06-18 19:08:37
46,194
2023-03-10 13:18:18
https://stackoverflow.com/q/17176859
https://stackoverflow.com/a/17176929
<p>Short answer: there is no proper way.</p> <p>What <code>git commit --amend</code> does is to &quot;replace&quot; the previous commit with a similar, but altered, commit. You haven't really altered the original commit. It is still there, but nothing references it anymore and it will eventually be garbage collected un...
<p>Short answer: there is no proper way.</p> <p>What <code>git commit --amend</code> does is to &quot;replace&quot; the previous commit with a similar, but altered, commit. You haven't really altered the original commit. It is still there, but nothing references it anymore and it will eventually be garbage collected un...
119, 3809, 4236, 30968
commit-message, git, git-amend, push
<h1>Amending a pushed commit message</h1> <p>I just made pushed a commit, then realized I needed to change the commit message. </p> <p>So on my local repo I did:</p> <pre><code>git commit --amend -m "New commit message" </code></pre> <p>But when I then tried to push this, I got loads of error messages saying</p> <p...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
23,021
git
# Amending a pushed commit message I just made pushed a commit, then realized I needed to change the commit message. So on my local repo I did: ``` git commit --amend -m "New commit message" ``` But when I then tried to push this, I got loads of error messages saying ``` Updates were rejected because the tip of yo...
Short answer: there is no proper way. What `git commit --amend` does is to "replace" the previous commit with a similar, but altered, commit. You haven't really altered the original commit. It is still there, but nothing references it anymore and it will eventually be garbage collected unless something starts referenc...
11382565
How to git push to remote if remote does not exist at all
11
2012-07-08 10:55:12
<p>If remote (using ssh) does not contain the git repository, is it still possible to copy the local repository to remote and setup the remote tracking without manually copying the files using scp and doing then followed by a git clone?</p>
5,403
398,230
2021-06-14 07:01:46
11,382,601
12
2012-07-08 11:01:14
912,144
2012-07-08 11:01:14
https://stackoverflow.com/q/11382565
https://stackoverflow.com/a/11382601
<p>You <em>do</em> need to setup the repository on the remote, but you shouldn't copy the files manually. At the very least, you don't get the history with it.</p> <p>First, ssh to your remote and do this:</p> <pre><code>mkdir your_repo.git cd your_repo.git git init --bare </code></pre> <p>The <code>.git</code> in d...
<p>You <em>do</em> need to setup the repository on the remote, but you shouldn't copy the files manually. At the very least, you don't get the history with it.</p> <p>First, ssh to your remote and do this:</p> <pre><code>mkdir your_repo.git cd your_repo.git git init --bare </code></pre> <p>The <code>.git</code> in d...
119
git
<h1>How to git push to remote if remote does not exist at all</h1> <p>If remote (using ssh) does not contain the git repository, is it still possible to copy the local repository to remote and setup the remote tracking without manually copying the files using scp and doing then followed by a git clone?</p>
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
23,024
git
# How to git push to remote if remote does not exist at all If remote (using ssh) does not contain the git repository, is it still possible to copy the local repository to remote and setup the remote tracking without manually copying the files using scp and doing then followed by a git clone?
You *do* need to setup the repository on the remote, but you shouldn't copy the files manually. At the very least, you don't get the history with it. First, ssh to your remote and do this: ``` mkdir your_repo.git cd your_repo.git git init --bare ``` The `.git` in directory name is completely optional. The `--bare` o...
10959928
What does "commit your changes or stash them" mean?
11
2012-06-09 09:39:46
<p>I have my branch on my GIT repository where I used to commit and push. But today I saw a different programmer committed and pushed to my branch. Now when I try to pull the latest branch GIT completes it half way and then gives error "Either commit your changes or stash them". I have no idea what that means and I do...
17,219
1,383,644
2024-08-15 10:13:32
10,959,956
12
2012-06-09 09:44:46
33,213
2024-08-15 10:13:32
https://stackoverflow.com/q/10959928
https://stackoverflow.com/a/10959956
<p>It means that you have uncommitted changes, which prevents you from pulling.</p> <p>And you solve it by either committing them or <a href="https://git-scm.com/book/en/v2/Git-Tools-Stashing-and-Cleaning" rel="nofollow noreferrer">stashing</a> them. Just like the error message says.</p> <p>(By the way, you typically g...
<p>It means that you have uncommitted changes, which prevents you from pulling.</p> <p>And you solve it by either committing them or <a href="https://git-scm.com/book/en/v2/Git-Tools-Stashing-and-Cleaning" rel="nofollow noreferrer">stashing</a> them. Just like the error message says.</p> <p>(By the way, you typically g...
119, 456
git, version-control
<h1>What does "commit your changes or stash them" mean?</h1> <p>I have my branch on my GIT repository where I used to commit and push. But today I saw a different programmer committed and pushed to my branch. Now when I try to pull the latest branch GIT completes it half way and then gives error "Either commit your ch...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
23,025
git
# What does "commit your changes or stash them" mean? I have my branch on my GIT repository where I used to commit and push. But today I saw a different programmer committed and pushed to my branch. Now when I try to pull the latest branch GIT completes it half way and then gives error "Either commit your changes or s...
It means that you have uncommitted changes, which prevents you from pulling. And you solve it by either committing them or [stashing](https://git-scm.com/book/en/v2/Git-Tools-Stashing-and-Cleaning) them. Just like the error message says. (By the way, you typically get better answers by asking precise questions. If yo...
10707404
Show branches that do not contain commit
11
2012-05-22 17:55:57
<p><code>git branch -a --contains &lt;hash&gt;</code> gives me all those branches containing <code>hash</code>. what I want is <code>git branch -a --no-contains &lt;hash&gt;</code>. Unfortunately, there doesn't seem to be a command to accomplish this, so I'm thinking the solution is something like:</p> <p><code>git br...
2,281
709,943
2017-06-21 23:39:44
10,708,615
12
2012-05-22 19:17:56
115,478
2015-12-01 20:47:15
https://stackoverflow.com/q/10707404
https://stackoverflow.com/a/10708615
<p><code>grep</code> has a <code>-F</code> option which matches fixed strings. Would be useful for what you're doing.</p> <pre><code>git branch -a | grep -vF "$(git branch -a --contains &lt;hash&gt;)" </code></pre> <p>Unfortunately, <code>-F</code> will filter out branches names that have a partial match. As suggeste...
<p><code>grep</code> has a <code>-F</code> option which matches fixed strings. Would be useful for what you're doing.</p> <pre><code>git branch -a | grep -vF "$(git branch -a --contains &lt;hash&gt;)" </code></pre> <p>Unfortunately, <code>-F</code> will filter out branches names that have a partial match. As suggeste...
119, 1879, 3346
branch, dvcs, git
<h1>Show branches that do not contain commit</h1> <p><code>git branch -a --contains &lt;hash&gt;</code> gives me all those branches containing <code>hash</code>. what I want is <code>git branch -a --no-contains &lt;hash&gt;</code>. Unfortunately, there doesn't seem to be a command to accomplish this, so I'm thinking th...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
23,026
git
# Show branches that do not contain commit `git branch -a --contains <hash>` gives me all those branches containing `hash`. what I want is `git branch -a --no-contains <hash>`. Unfortunately, there doesn't seem to be a command to accomplish this, so I'm thinking the solution is something like: `git branch -a | grep -...
`grep` has a `-F` option which matches fixed strings. Would be useful for what you're doing. ``` git branch -a | grep -vF "$(git branch -a --contains <hash>)" ``` Unfortunately, `-F` will filter out branches names that have a partial match. As suggested by antak, we can use `comm` instead for a more reliable diff. `...
10048783
git submodule add fatal: Not a Git Repository
11
2012-04-06 20:18:23
<p>I am fairly new to Git and trying my best to find some documentation on this problem to no avail.</p> <p>Here's my command:</p> <pre><code>$ git submodule add https://github.com/joliver/EventStore.git externalsource/JOliverEventStore/ </code></pre> <blockquote> <p>fatal: Not a git repository: ../.git/modules/e...
33,861
109,605
2021-06-25 16:10:42
10,053,363
12
2012-04-07 09:36:42
6,309
2013-05-14 06:05:47
https://stackoverflow.com/q/10048783
https://stackoverflow.com/a/10053363
<p>It can depends on the version of Git you are using: this <a href="http://git.661346.n2.nabble.com/BUG-Fail-to-add-a-module-in-a-subdirectory-if-module-is-already-cloned-td7221426.html" rel="nofollow noreferrer">recent thread (February 2012)</a> mentions a bug:</p> <blockquote> <p>Since recently a submodule with n...
<p>It can depends on the version of Git you are using: this <a href="http://git.661346.n2.nabble.com/BUG-Fail-to-add-a-module-in-a-subdirectory-if-module-is-already-cloned-td7221426.html" rel="nofollow noreferrer">recent thread (February 2012)</a> mentions a bug:</p> <blockquote> <p>Since recently a submodule with n...
119, 41612
git, git-submodules
<h1>git submodule add fatal: Not a Git Repository</h1> <p>I am fairly new to Git and trying my best to find some documentation on this problem to no avail.</p> <p>Here's my command:</p> <pre><code>$ git submodule add https://github.com/joliver/EventStore.git externalsource/JOliverEventStore/ </code></pre> <blockquo...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
23,027
git
# git submodule add fatal: Not a Git Repository I am fairly new to Git and trying my best to find some documentation on this problem to no avail. Here's my command: ``` $ git submodule add https://github.com/joliver/EventStore.git externalsource/JOliverEventStore/ ``` > fatal: Not a git repository: ../.git/modules/...
It can depends on the version of Git you are using: this [recent thread (February 2012)](http://git.661346.n2.nabble.com/BUG-Fail-to-add-a-module-in-a-subdirectory-if-module-is-already-cloned-td7221426.html) mentions a bug: > Since recently a submodule with name `<name>` has its git directory in the `.git/modules/<nam...
9819124
How to delete all git aliases at once?
11
2012-03-22 09:06:23
<p>How can I delete all existing git aliases at once? I tried <em>git config --unset-all ...</em> but was unable to figure out the correct syntax for this command.</p>
2,898
844,177
2012-03-22 10:46:18
9,820,734
12
2012-03-22 10:46:18
1,073,300
2012-03-22 10:46:18
https://stackoverflow.com/q/9819124
https://stackoverflow.com/a/9820734
<p>Have you tried this:</p> <pre><code>git config [--global] --remove-section alias </code></pre>
<p>Have you tried this:</p> <pre><code>git config [--global] --remove-section alias </code></pre>
119, 391
git, terminal
<h1>How to delete all git aliases at once?</h1> <p>How can I delete all existing git aliases at once? I tried <em>git config --unset-all ...</em> but was unable to figure out the correct syntax for this command.</p>
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
23,028
git
# How to delete all git aliases at once? How can I delete all existing git aliases at once? I tried *git config --unset-all ...* but was unable to figure out the correct syntax for this command.
Have you tried this: ``` git config [--global] --remove-section alias ```
9179161
git reconnect to a remote repository
11
2012-02-07 15:41:04
<p>I made a huge mistake that resulted in my having a local version of my project that is no longer connected with the remote repository it was once associated with. Is there some trick to reestablishing that connection/association w/o blowing away the local version of the code?</p>
11,903
null
2024-12-31 18:51:43
9,179,222
12
2012-02-07 15:44:18
643,109
2012-04-15 14:50:40
https://stackoverflow.com/q/9179161
https://stackoverflow.com/a/9179222
<p>Did you try:</p> <pre><code>git remote add --track master origin [url-to-git-repo] </code></pre>
<p>Did you try:</p> <pre><code>git remote add --track master origin [url-to-git-repo] </code></pre>
119
git
<h1>git reconnect to a remote repository</h1> <p>I made a huge mistake that resulted in my having a local version of my project that is no longer connected with the remote repository it was once associated with. Is there some trick to reestablishing that connection/association w/o blowing away the local version of the ...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
23,029
git
# git reconnect to a remote repository I made a huge mistake that resulted in my having a local version of my project that is no longer connected with the remote repository it was once associated with. Is there some trick to reestablishing that connection/association w/o blowing away the local version of the code?
Did you try: ``` git remote add --track master origin [url-to-git-repo] ```
5737579
Getting the full git log after rolling back to a previous version
11
2011-04-20 22:57:37
<p>I'm new to git, and probably not using correct terminology, so bear with me :)</p> <p>Let's say I have a repository with 5 changes, e.g.</p> <pre><code>D:\test\gitrepo2&gt;git log --oneline 3a5fd33 555 3cfbfae 444 e9a78c8 333 a618586 222 b80d5e1 111 </code></pre> <p>I learned that I can sync back to an earlier re...
7,107
111,888
2011-04-22 03:10:56
5,737,808
12
2011-04-20 23:29:59
54,249
2011-04-20 23:29:59
https://stackoverflow.com/q/5737579
https://stackoverflow.com/a/5737808
<p>I assume by "sync back" you really mean you just want your working copy to look like a previous point in time. To do that, you want <code>checkout</code>, not <code>reset</code>:</p> <pre><code>&gt; git checkout e9a78c8 </code></pre> <p>At that point, your repository looks like this:</p> <pre><code>&gt; git log m...
<p>I assume by "sync back" you really mean you just want your working copy to look like a previous point in time. To do that, you want <code>checkout</code>, not <code>reset</code>:</p> <pre><code>&gt; git checkout e9a78c8 </code></pre> <p>At that point, your repository looks like this:</p> <pre><code>&gt; git log m...
64, 119
git, windows
<h1>Getting the full git log after rolling back to a previous version</h1> <p>I'm new to git, and probably not using correct terminology, so bear with me :)</p> <p>Let's say I have a repository with 5 changes, e.g.</p> <pre><code>D:\test\gitrepo2&gt;git log --oneline 3a5fd33 555 3cfbfae 444 e9a78c8 333 a618586 222 b8...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
23,030
git
# Getting the full git log after rolling back to a previous version I'm new to git, and probably not using correct terminology, so bear with me :) Let's say I have a repository with 5 changes, e.g. ``` D:\test\gitrepo2>git log --oneline 3a5fd33 555 3cfbfae 444 e9a78c8 333 a618586 222 b80d5e1 111 ``` I learned that ...
I assume by "sync back" you really mean you just want your working copy to look like a previous point in time. To do that, you want `checkout`, not `reset`: ``` > git checkout e9a78c8 ``` At that point, your repository looks like this: ``` > git log master --oneline 3a5fd33 555 <--- master is still here 3cfbfae 44...
5271794
How to get rid of "refs/bisect/bad" branches in Git
11
2011-03-11 10:34:41
<p>I have the following in my <code>~/.gitconfig</code> <em>(this is only here to help you understand what I'm looking at)</em>:</p> <pre><code>[alias] lg = log --graph --all --pretty=format:'%Cred%h %Cgreen(%cr)%Creset - %s %C(yellow)%d %C(bold blue)&lt;%an&gt;%Creset' --abbrev-commit --date=relative </code></pre...
1,406
146,272
2011-03-11 10:48:05
5,271,937
12
2011-03-11 10:48:05
223,092
2011-03-11 10:48:05
https://stackoverflow.com/q/5271794
https://stackoverflow.com/a/5271937
<p>When you're using <code>git bisect</code>, it uses <code>refs/bisect/bad</code> to track the last bad commit. (That ref is updated when you do <code>git bisect bad</code>.)</p> <p>I suspect that what's happened here is that you got to the end of the bisect, and it reported the first bad commit, but you never ended...
<p>When you're using <code>git bisect</code>, it uses <code>refs/bisect/bad</code> to track the last bad commit. (That ref is updated when you do <code>git bisect bad</code>.)</p> <p>I suspect that what's happened here is that you got to the end of the bisect, and it reported the first bad commit, but you never ended...
119, 47326
git, git-bisect
<h1>How to get rid of "refs/bisect/bad" branches in Git</h1> <p>I have the following in my <code>~/.gitconfig</code> <em>(this is only here to help you understand what I'm looking at)</em>:</p> <pre><code>[alias] lg = log --graph --all --pretty=format:'%Cred%h %Cgreen(%cr)%Creset - %s %C(yellow)%d %C(bold blue)&lt...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
23,031
git
# How to get rid of "refs/bisect/bad" branches in Git I have the following in my `~/.gitconfig` *(this is only here to help you understand what I'm looking at)*: ``` [alias] lg = log --graph --all --pretty=format:'%Cred%h %Cgreen(%cr)%Creset - %s %C(yellow)%d %C(bold blue)<%an>%Creset' --abbrev-commit --date=rela...
When you're using `git bisect`, it uses `refs/bisect/bad` to track the last bad commit. (That ref is updated when you do `git bisect bad`.) I suspect that what's happened here is that you got to the end of the bisect, and it reported the first bad commit, but you never ended the bisection with `git bisect reset`, whic...
2728404
What are the destructive commands in git?
11
2010-04-28 09:56:00
<p>I read that Git mainly adds information about the repository's history, trying to remember every change made, but that there are also commands that make irreversible changes.</p> <p>What are the commands that I should really pay attention to and avoid using wrongly because there is no turning back?</p>
5,968
210,090
2018-11-03 10:17:51
2,730,532
12
2010-04-28 14:50:15
149,170
2010-04-28 14:50:15
https://stackoverflow.com/q/2728404
https://stackoverflow.com/a/2730532
<p>There are two kinds of "destructive" here -- commands that are destructive to your git history and commands that discard changes in your working copy.</p> <p>Commands that discard <em>work tree changes</em>:</p> <ol> <li><code>git reset</code></li> <li><code>git checkout</code></li> </ol> <p>As others have mentio...
<p>There are two kinds of "destructive" here -- commands that are destructive to your git history and commands that discard changes in your working copy.</p> <p>Commands that discard <em>work tree changes</em>:</p> <ol> <li><code>git reset</code></li> <li><code>git checkout</code></li> </ol> <p>As others have mentio...
119
git
<h1>What are the destructive commands in git?</h1> <p>I read that Git mainly adds information about the repository's history, trying to remember every change made, but that there are also commands that make irreversible changes.</p> <p>What are the commands that I should really pay attention to and avoid using wrongly...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
23,032
git
# What are the destructive commands in git? I read that Git mainly adds information about the repository's history, trying to remember every change made, but that there are also commands that make irreversible changes. What are the commands that I should really pay attention to and avoid using wrongly because there i...
There are two kinds of "destructive" here -- commands that are destructive to your git history and commands that discard changes in your working copy. Commands that discard *work tree changes*: 1. `git reset` 2. `git checkout` As others have mentioned, the combination of the reflog and the fact that git objects don'...
68135850
Permanently disable git tag version for npm version
10
2021-06-25 18:47:19
<p>When running the command &quot;npm version&quot; you can provide a --no-git-tag-version flag to stop tags from being generated and committed. Is there a way to make this the default behavior so I don't have to remember to type --no-git-tag-version every time?</p>
7,566
5,946,763
2023-09-09 17:49:41
68,135,942
12
2021-06-25 18:57:44
6,577,998
2022-06-03 14:40:37
https://stackoverflow.com/q/68135850
https://stackoverflow.com/a/68135942
<p>The first thing that comes to mind that is relatively easy to do is make an alias for this specific command. Something like</p> <pre><code>alias npm-nt=&quot;npm version --no-git-tag-version&quot; # npm version no tag </code></pre> <p>Then just call <code>npm-nt</code> instead of <code>npm version --no-git-tag-versi...
<p>The first thing that comes to mind that is relatively easy to do is make an alias for this specific command. Something like</p> <pre><code>alias npm-nt=&quot;npm version --no-git-tag-version&quot; # npm version no tag </code></pre> <p>Then just call <code>npm-nt</code> instead of <code>npm version --no-git-tag-versi...
119, 61387
git, npm
<h1>Permanently disable git tag version for npm version</h1> <p>When running the command &quot;npm version&quot; you can provide a --no-git-tag-version flag to stop tags from being generated and committed. Is there a way to make this the default behavior so I don't have to remember to type --no-git-tag-version every ti...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
23,036
git
# Permanently disable git tag version for npm version When running the command "npm version" you can provide a --no-git-tag-version flag to stop tags from being generated and committed. Is there a way to make this the default behavior so I don't have to remember to type --no-git-tag-version every time?
The first thing that comes to mind that is relatively easy to do is make an alias for this specific command. Something like ``` alias npm-nt="npm version --no-git-tag-version" # npm version no tag ``` Then just call `npm-nt` instead of `npm version --no-git-tag-version`. --- *Edit* - given the comment about that th...
61128146
Get previous branch name
10
2020-04-09 18:46:40
<p>I really like <code>git checkout -</code> to move to my previous branch.</p> <p>But sometimes I only need to know what my previous branch name is. How could I ask Git that?</p> <p>For example, if <code>git checkout -</code> moves to branch "prev", I want the command to get just "prev".</p>
1,422
201,303
2023-04-17 09:45:39
61,128,219
12
2020-04-09 18:50:36
3,001,761
2020-04-09 18:56:51
https://stackoverflow.com/q/61128146
https://stackoverflow.com/a/61128219
<p><code>git checkout -</code> is shorthand for <code>git checkout @{-1}</code> (see <a href="https://git-scm.com/docs/git-checkout#Documentation/git-checkout.txt-ltbranchgt" rel="noreferrer">here</a>):</p> <blockquote> <p>You can use the <code>@{-N}</code> syntax to refer to the N-th last branch/commit checked ou...
<p><code>git checkout -</code> is shorthand for <code>git checkout @{-1}</code> (see <a href="https://git-scm.com/docs/git-checkout#Documentation/git-checkout.txt-ltbranchgt" rel="noreferrer">here</a>):</p> <blockquote> <p>You can use the <code>@{-N}</code> syntax to refer to the N-th last branch/commit checked ou...
119, 37230
git, git-checkout
<h1>Get previous branch name</h1> <p>I really like <code>git checkout -</code> to move to my previous branch.</p> <p>But sometimes I only need to know what my previous branch name is. How could I ask Git that?</p> <p>For example, if <code>git checkout -</code> moves to branch "prev", I want the command to get just "p...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
23,039
git
# Get previous branch name I really like `git checkout -` to move to my previous branch. But sometimes I only need to know what my previous branch name is. How could I ask Git that? For example, if `git checkout -` moves to branch "prev", I want the command to get just "prev".
`git checkout -` is shorthand for `git checkout @{-1}` (see [here](https://git-scm.com/docs/git-checkout#Documentation/git-checkout.txt-ltbranchgt)): > You can use the `@{-N}` syntax to refer to the N-th last branch/commit > checked out using "git checkout" operation. You may also specify `-` > which is synonymous to ...
55970749
Git push using jenkins credentials from declarative pipeline
10
2019-05-03 13:23:55
<p>I'm using jenkins pipeline (declarative synthax) and I want to push a commit to my remote repository.</p> <p>Is there any way to accomplish this using the git plugin? Here is what I'm currently trying:</p> <pre><code>withCredentials([usernamePassword(credentialsId: "${GIT_CREDENTIAL_ID}", passwordVariable: 'GIT_PA...
22,910
5,456,024
2020-10-09 07:15:15
56,107,353
12
2019-05-13 07:13:06
5,456,024
2019-05-13 07:13:06
https://stackoverflow.com/q/55970749
https://stackoverflow.com/a/56107353
<p>We finally figure it out. The problem was simply that we have special characters in our password which break out the url.</p> <p>Here is the working code:</p> <pre><code>withCredentials([usernamePassword(credentialsId: env.GIT_CREDENTIAL_ID, usernameVariable: 'USER', passwordVariable: 'PASS')]) { ...
<p>We finally figure it out. The problem was simply that we have special characters in our password which break out the url.</p> <p>Here is the working code:</p> <pre><code>withCredentials([usernamePassword(credentialsId: env.GIT_CREDENTIAL_ID, usernameVariable: 'USER', passwordVariable: 'PASS')]) { ...
119, 28898, 64999, 118285
git, git-push, jenkins, jenkins-pipeline
<h1>Git push using jenkins credentials from declarative pipeline</h1> <p>I'm using jenkins pipeline (declarative synthax) and I want to push a commit to my remote repository.</p> <p>Is there any way to accomplish this using the git plugin? Here is what I'm currently trying:</p> <pre><code>withCredentials([usernamePas...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
23,041
git
# Git push using jenkins credentials from declarative pipeline I'm using jenkins pipeline (declarative synthax) and I want to push a commit to my remote repository. Is there any way to accomplish this using the git plugin? Here is what I'm currently trying: ``` withCredentials([usernamePassword(credentialsId: "${GIT...
We finally figure it out. The problem was simply that we have special characters in our password which break out the url. Here is the working code: ``` withCredentials([usernamePassword(credentialsId: env.GIT_CREDENTIAL_ID, usernameVariable: 'USER', passwordVariable: 'PASS')]) { script { ...
54227968
What's the difference between `arc graft` and `arc patch`?
10
2019-01-17 02:01:34
<p><code>arc help --full | less</code> reveals this for <code>graft</code>:</p> <pre><code> graft revision Grafts revision and its dependencies (if any) onto your working tree. --force Do not run any sanity checks. --skip-landed Do not try to patch landed/closed diffs. </code><...
12,759
4,561,887
2021-06-21 00:29:54
54,231,342
12
2019-01-17 07:57:09
4,561,887
2020-03-19 22:17:01
https://stackoverflow.com/q/54227968
https://stackoverflow.com/a/54231342
<p><strong>Update 19 Mar. 2020:</strong> </p> <p>Note that <code>arc flow</code> and <code>arc cascade</code> are apparently not part of the <a href="https://github.com/phacility/arcanist" rel="noreferrer">mainstream version of Phacility's arcanist</a>. Rather, they are only part of the <a href="https://github.com/u...
<p><strong>Update 19 Mar. 2020:</strong> </p> <p>Note that <code>arc flow</code> and <code>arc cascade</code> are apparently not part of the <a href="https://github.com/phacility/arcanist" rel="noreferrer">mainstream version of Phacility's arcanist</a>. Rather, they are only part of the <a href="https://github.com/u...
119, 80205, 95672
arcanist, git, phabricator
<h1>What's the difference between `arc graft` and `arc patch`?</h1> <p><code>arc help --full | less</code> reveals this for <code>graft</code>:</p> <pre><code> graft revision Grafts revision and its dependencies (if any) onto your working tree. --force Do not run any sanity checks. --ski...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
23,042
git
# What's the difference between `arc graft` and `arc patch`? `arc help --full | less` reveals this for `graft`: ``` graft revision Grafts revision and its dependencies (if any) onto your working tree. --force Do not run any sanity checks. --skip-landed Do not try to patch la...
**Update 19 Mar. 2020:** Note that `arc flow` and `arc cascade` are apparently not part of the [mainstream version of Phacility's arcanist](https://github.com/phacility/arcanist). Rather, they are only part of the [Uber fork of arcanist](https://github.com/uber/arcanist). Some of the `arc flow` source code is found [h...
38835048
Correct paging and coloured output using Git for Windows via Cygwin
10
2016-08-08 17:16:49
<p>Title says it all: is it possible to get Git for Windows to pipe its output through cygwin's less so that it shows up correctly in a mintty window? There have been a number of questions asked about this, but still no definitive answer.</p> <p>Arguably this kind of setup is a little esoteric, but<br> - I need cygwin...
1,199
1,147,783
2016-08-09 12:38:56
38,851,000
12
2016-08-09 12:38:56
1,147,783
2016-08-09 12:38:56
https://stackoverflow.com/q/38835048
https://stackoverflow.com/a/38851000
<p>It turned out to be surprisingly easy:<br> <code>git config --global core.pager 'C:/cygwin/bin/less.exe'</code><br> or<br> <code>git config --global core.pager 'C:\\cygwin\\bin\\less.exe'</code><br> will both do the trick. (With the path adjusted to wherever your installation of cygwin lies.) I didn't find this at f...
<p>It turned out to be surprisingly easy:<br> <code>git config --global core.pager 'C:/cygwin/bin/less.exe'</code><br> or<br> <code>git config --global core.pager 'C:\\cygwin\\bin\\less.exe'</code><br> will both do the trick. (With the path adjusted to wherever your installation of cygwin lies.) I didn't find this at f...
119, 1731
cygwin, git
<h1>Correct paging and coloured output using Git for Windows via Cygwin</h1> <p>Title says it all: is it possible to get Git for Windows to pipe its output through cygwin's less so that it shows up correctly in a mintty window? There have been a number of questions asked about this, but still no definitive answer.</p> ...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
23,044
git
# Correct paging and coloured output using Git for Windows via Cygwin Title says it all: is it possible to get Git for Windows to pipe its output through cygwin's less so that it shows up correctly in a mintty window? There have been a number of questions asked about this, but still no definitive answer. Arguably thi...
It turned out to be surprisingly easy: `git config --global core.pager 'C:/cygwin/bin/less.exe'` or `git config --global core.pager 'C:\\cygwin\\bin\\less.exe'` will both do the trick. (With the path adjusted to wherever your installation of cygwin lies.) I didn't find this at first because of the need for doub...
36605357
Git Rebase repeats conflicts from last Rebase
10
2016-04-13 17:19:40
<p>Are there any common git usage mistakes or in general any reasons at all why a rebase would repeat the conflicts from the previous rebase if those conflicts had all been resolved in the previous rebase?<br> Furthermore, does rebase have a preference over how the conflict was resolved? e.g. does rebase want a strict ...
4,855
3,431,836
2024-05-29 13:50:46
36,605,468
12
2016-04-13 17:25:42
212,858
2024-05-29 13:50:46
https://stackoverflow.com/q/36605357
https://stackoverflow.com/a/36605468
<p>In general, it's normal - if you rebase like this rather than merging (eg. master into dev), then replaying the same patches will likely generate the same conflicts.</p> <p>You can use <a href="https://git-scm.com/book/en/v2/Git-Tools-Rerere" rel="nofollow noreferrer">git rerere</a> to remember your resolutions if t...
<p>In general, it's normal - if you rebase like this rather than merging (eg. master into dev), then replaying the same patches will likely generate the same conflicts.</p> <p>You can use <a href="https://git-scm.com/book/en/v2/Git-Tools-Rerere" rel="nofollow noreferrer">git rerere</a> to remember your resolutions if t...
119, 29934, 106113
git, git-merge-conflict, git-rebase
<h1>Git Rebase repeats conflicts from last Rebase</h1> <p>Are there any common git usage mistakes or in general any reasons at all why a rebase would repeat the conflicts from the previous rebase if those conflicts had all been resolved in the previous rebase?<br> Furthermore, does rebase have a preference over how the...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
23,045
git
# Git Rebase repeats conflicts from last Rebase Are there any common git usage mistakes or in general any reasons at all why a rebase would repeat the conflicts from the previous rebase if those conflicts had all been resolved in the previous rebase? Furthermore, does rebase have a preference over how the conflict w...
In general, it's normal - if you rebase like this rather than merging (eg. master into dev), then replaying the same patches will likely generate the same conflicts. You can use [git rerere](https://git-scm.com/book/en/v2/Git-Tools-Rerere) to remember your resolutions if this is a common problem in your workflow. Fir...
32463461
Is it safe to add ._* in gitignore?
10
2015-09-08 17:07:19
<p>I am on a Mac developing an OS X app with some C/C++ code. I recently added some files to my repository and their duplicate files are showing up as <code>._name</code>.</p> <p>I looked up my .gitignore file and it has <code>.DS_Store</code> and few other filters but nothing preventing these <code>._</code> files.</...
5,686
1,185,422
2015-09-08 18:09:38
32,464,440
12
2015-09-08 18:06:30
1,843,331
2015-09-08 18:06:30
https://stackoverflow.com/q/32463461
https://stackoverflow.com/a/32464440
<p>On Mac OS, the finder can in some cases create <code>._</code> files that hold some Mac OS specific file information. See <a href="https://apple.stackexchange.com/questions/14980/why-are-dot-underscore-files-created-and-how-can-i-avoid-them">https://apple.stackexchange.com/questions/14980/why-are-dot-underscore-file...
<p>On Mac OS, the finder can in some cases create <code>._</code> files that hold some Mac OS specific file information. See <a href="https://apple.stackexchange.com/questions/14980/why-are-dot-underscore-files-created-and-how-can-i-avoid-them">https://apple.stackexchange.com/questions/14980/why-are-dot-underscore-file...
119, 369
git, macos
<h1>Is it safe to add ._* in gitignore?</h1> <p>I am on a Mac developing an OS X app with some C/C++ code. I recently added some files to my repository and their duplicate files are showing up as <code>._name</code>.</p> <p>I looked up my .gitignore file and it has <code>.DS_Store</code> and few other filters but noth...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
23,046
git
# Is it safe to add ._* in gitignore? I am on a Mac developing an OS X app with some C/C++ code. I recently added some files to my repository and their duplicate files are showing up as `._name`. I looked up my .gitignore file and it has `.DS_Store` and few other filters but nothing preventing these `._` files. Is t...
On Mac OS, the finder can in some cases create `._` files that hold some Mac OS specific file information. See <https://apple.stackexchange.com/questions/14980/why-are-dot-underscore-files-created-and-how-can-i-avoid-them> for details. However these are OS specific files, and therefore should not be checked into versi...
32166548
How to list all tags within a certain git branch
10
2015-08-23 12:17:31
<p>I have a couple of branches in my git repo. I would like to know if there is a command that lists all the tags within a certain branch not all the tags in the whole repo.</p> <p>I tried <code>git tag --contains</code>. but it didn't work as expected.</p> <p>Image 1, there's a list of all the tags with their hashe...
20,015
4,558,644
2018-04-20 11:42:33
32,169,239
12
2015-08-23 17:08:28
2,044,940
2015-08-23 17:42:11
https://stackoverflow.com/q/32166548
https://stackoverflow.com/a/32169239
<p>To print all tags, that point to a certain commit, you can do:</p> <pre><code>git for-each-ref refs/tags | grep HASH </code></pre> <p>Or if you are on Windows and don't use Cygwin or similar:</p> <pre><code>git for-each-ref refs/tags | find "HASH" </code></pre> <p>If you want the tag name only, you can't use Git...
<p>To print all tags, that point to a certain commit, you can do:</p> <pre><code>git for-each-ref refs/tags | grep HASH </code></pre> <p>Or if you are on Windows and don't use Cygwin or similar:</p> <pre><code>git for-each-ref refs/tags | find "HASH" </code></pre> <p>If you want the tag name only, you can't use Git...
119
git
<h1>How to list all tags within a certain git branch</h1> <p>I have a couple of branches in my git repo. I would like to know if there is a command that lists all the tags within a certain branch not all the tags in the whole repo.</p> <p>I tried <code>git tag --contains</code>. but it didn't work as expected.</p> <...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
23,047
git
# How to list all tags within a certain git branch I have a couple of branches in my git repo. I would like to know if there is a command that lists all the tags within a certain branch not all the tags in the whole repo. I tried `git tag --contains`. but it didn't work as expected. Image 1, there's a list of all th...
To print all tags, that point to a certain commit, you can do: ``` git for-each-ref refs/tags | grep HASH ``` Or if you are on Windows and don't use Cygwin or similar: ``` git for-each-ref refs/tags | find "HASH" ``` If you want the tag name only, you can't use Git's `--format` , because we need it for grep'ing. Th...
26693125
CtrlP: ignore files in subdirectory within a git repo
10
2014-11-01 20:52:46
<p>For my repo, suppose it's called <code>top</code></p> <pre><code>top\ .gitignore foo\ bar\ </code></pre> <p>I want CtrlP to list files that are </p> <ol> <li>Under <code>foo\</code> </li> <li>Is not ignored by <code>.gitignore</code> defined in <strong>top\</strong></li> </ol> <p>If I cd into <code>top\f...
2,259
1,780,148
2014-11-05 03:11:43
26,729,140
12
2014-11-04 06:39:55
1,290,731
2014-11-04 06:39:55
https://stackoverflow.com/q/26693125
https://stackoverflow.com/a/26729140
<p>From <a href="http://kien.github.io/ctrlp.vim/" rel="noreferrer">its home page</a> it looks like you can use</p> <pre><code>let g:ctrlp_user_command = [ \ '.git', 'cd %s &amp;&amp; git ls-files . -co --exclude-standard', \ 'find %s -type f' \ ] </code></pre> <p>which will have the advantage of honoring...
<p>From <a href="http://kien.github.io/ctrlp.vim/" rel="noreferrer">its home page</a> it looks like you can use</p> <pre><code>let g:ctrlp_user_command = [ \ '.git', 'cd %s &amp;&amp; git ls-files . -co --exclude-standard', \ 'find %s -type f' \ ] </code></pre> <p>which will have the advantage of honoring...
119, 370, 25056, 85691
ctrlp, git, gitignore, vim
<h1>CtrlP: ignore files in subdirectory within a git repo</h1> <p>For my repo, suppose it's called <code>top</code></p> <pre><code>top\ .gitignore foo\ bar\ </code></pre> <p>I want CtrlP to list files that are </p> <ol> <li>Under <code>foo\</code> </li> <li>Is not ignored by <code>.gitignore</code> defined i...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
23,048
git
# CtrlP: ignore files in subdirectory within a git repo For my repo, suppose it's called `top` ``` top\ .gitignore foo\ bar\ ``` I want CtrlP to list files that are 1. Under `foo\` 2. Is not ignored by `.gitignore` defined in **top\** If I cd into `top\foo\`, and open vim from there, 1 would be satisfied but...
From [its home page](http://kien.github.io/ctrlp.vim/) it looks like you can use ``` let g:ctrlp_user_command = [ \ '.git', 'cd %s && git ls-files . -co --exclude-standard', \ 'find %s -type f' \ ] ``` which will have the advantage of honoring all of git's ignore-pattern processing, not just the toplevel ...
23681852
Can I use command-line Git tools and TortoiseGit simultaneously?
10
2014-05-15 14:55:01
<p>Sometimes information regarding git are more detailed and easier accessible when using git-bash than using TortoiseGit. Therefore, I would want to use git-bash for very specific issues (e.g. creating a branch/checkout at the same time and commit uncomitted changes).</p> <pre><code>git checkout -b my_new_branch git ...
8,144
3,621,280
2021-06-07 13:47:40
23,681,941
12
2014-05-15 14:58:26
146,642
2014-05-15 14:58:26
https://stackoverflow.com/q/23681852
https://stackoverflow.com/a/23681941
<p>Yes. tortoise-git is just a user interface to the command line tools which just interpret the <code>.git</code> subdir in your project's directory. You can use them both on the same project, though running actions <em>concurrently</em> might cause problems, I'm not sure.</p>
<p>Yes. tortoise-git is just a user interface to the command line tools which just interpret the <code>.git</code> subdir in your project's directory. You can use them both on the same project, though running actions <em>concurrently</em> might cause problems, I'm not sure.</p>
119, 31409
git, tortoisegit
<h1>Can I use command-line Git tools and TortoiseGit simultaneously?</h1> <p>Sometimes information regarding git are more detailed and easier accessible when using git-bash than using TortoiseGit. Therefore, I would want to use git-bash for very specific issues (e.g. creating a branch/checkout at the same time and comm...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
23,049
git
# Can I use command-line Git tools and TortoiseGit simultaneously? Sometimes information regarding git are more detailed and easier accessible when using git-bash than using TortoiseGit. Therefore, I would want to use git-bash for very specific issues (e.g. creating a branch/checkout at the same time and commit uncomi...
Yes. tortoise-git is just a user interface to the command line tools which just interpret the `.git` subdir in your project's directory. You can use them both on the same project, though running actions *concurrently* might cause problems, I'm not sure.
21761728
GIt Config Alias With Quotes and Pipes via Command Line
10
2014-02-13 17:48:41
<p>I want to create a <code>sh</code> script that configures all my git aliases. Some of the aliases have pipes (<code>|</code>) and doublequotes (<code>"</code>). The output I want to see in my <code>~/.gitconfig</code> file is:</p> <pre><code>[alias] assume = update-index --assume-unchanged unassume = upda...
3,722
237,225
2024-04-29 17:17:05
21,761,958
12
2014-02-13 17:59:21
1,016,033
2014-02-13 17:59:21
https://stackoverflow.com/q/21761728
https://stackoverflow.com/a/21761958
<p>You don't need double quotes in .gitconfig.</p> <p>So the command is:</p> <pre><code>git config --global alias.assumed '!git ls-files -v | grep ^h | cut -c 3-' </code></pre>
<p>You don't need double quotes in .gitconfig.</p> <p>So the command is:</p> <pre><code>git config --global alias.assumed '!git ls-files -v | grep ^h | cut -c 3-' </code></pre>
119, 32868
git, git-config
<h1>GIt Config Alias With Quotes and Pipes via Command Line</h1> <p>I want to create a <code>sh</code> script that configures all my git aliases. Some of the aliases have pipes (<code>|</code>) and doublequotes (<code>"</code>). The output I want to see in my <code>~/.gitconfig</code> file is:</p> <pre><code>[alias]...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
23,050
git
# GIt Config Alias With Quotes and Pipes via Command Line I want to create a `sh` script that configures all my git aliases. Some of the aliases have pipes (`|`) and doublequotes (`"`). The output I want to see in my `~/.gitconfig` file is: ``` [alias] assume = update-index --assume-unchanged unassume = updat...
You don't need double quotes in .gitconfig. So the command is: ``` git config --global alias.assumed '!git ls-files -v | grep ^h | cut -c 3-' ```
20580611
How to reuse pending comments after git commit fail?
10
2013-12-14 06:59:47
<p>I use external editor to fill comments for "git commit", if by some reason commit fails all comments disappear. Is there some place where my comments for commit that's failed are stored ? </p> <p>Is there any specific git command to reuse such pending comments or repeat commit with pending comments ?</p>
1,265
1,569,246
2022-05-03 17:39:11
20,580,641
12
2013-12-14 07:04:59
641,955
2022-05-03 17:39:11
https://stackoverflow.com/q/20580611
https://stackoverflow.com/a/20580641
<p>tl;dr:</p> <ol> <li>Run <code>git commit -eF .git/COMMIT_EDITMSG</code></li> </ol> <p>or</p> <ol> <li>Run (only once): <code>git config --global alias.commit-reuse 'commit -eF .git/COMMIT_EDITMSG'</code></li> <li>Run (whenever you want to reuse a message): <code>git commit-reuse</code></li> </ol> <hr /> <p>If you wr...
<p>tl;dr:</p> <ol> <li>Run <code>git commit -eF .git/COMMIT_EDITMSG</code></li> </ol> <p>or</p> <ol> <li>Run (only once): <code>git config --global alias.commit-reuse 'commit -eF .git/COMMIT_EDITMSG'</code></li> <li>Run (whenever you want to reuse a message): <code>git commit-reuse</code></li> </ol> <hr /> <p>If you wr...
119, 53850
git, git-commit
<h1>How to reuse pending comments after git commit fail?</h1> <p>I use external editor to fill comments for "git commit", if by some reason commit fails all comments disappear. Is there some place where my comments for commit that's failed are stored ? </p> <p>Is there any specific git command to reuse such pending co...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
23,051
git
# How to reuse pending comments after git commit fail? I use external editor to fill comments for "git commit", if by some reason commit fails all comments disappear. Is there some place where my comments for commit that's failed are stored ? Is there any specific git command to reuse such pending comments or repeat ...
tl;dr: 1. Run `git commit -eF .git/COMMIT_EDITMSG` or 1. Run (only once): `git config --global alias.commit-reuse 'commit -eF .git/COMMIT_EDITMSG'` 2. Run (whenever you want to reuse a message): `git commit-reuse` --- If you write your commit message in an external editor, the message is stored in `.git/COMMIT_EDI...
19962024
Locking strategy of git to achieve concurrency?
10
2013-11-13 18:53:22
<p>So I've been reading lately about how to setup a git server, and upon finding that there is no specific daemon needed at all (just an SSH server with a filesystem behind it), I started to look more on how git manages files under the hood.</p> <p>The strategy of how each commit is represented inside the .objects fol...
3,763
544,947
2013-11-13 21:15:13
19,964,392
12
2013-11-13 21:09:59
438,742
2013-11-13 21:15:13
https://stackoverflow.com/q/19962024
https://stackoverflow.com/a/19964392
<p>The git data structures are immutable, except refs (i.e. branches/tags/etc), and "rewriting history" is not very correct term, more appropriate "creating alternative history". The repo will have all objects - new and old. Moreover, all the changes created in a local repository, during "push" objects are just transfe...
<p>The git data structures are immutable, except refs (i.e. branches/tags/etc), and "rewriting history" is not very correct term, more appropriate "creating alternative history". The repo will have all objects - new and old. Moreover, all the changes created in a local repository, during "push" objects are just transfe...
119, 511, 28898, 46509
concurrency, git, git-filter-branch, git-push
<h1>Locking strategy of git to achieve concurrency?</h1> <p>So I've been reading lately about how to setup a git server, and upon finding that there is no specific daemon needed at all (just an SSH server with a filesystem behind it), I started to look more on how git manages files under the hood.</p> <p>The strategy ...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
23,052
git
# Locking strategy of git to achieve concurrency? So I've been reading lately about how to setup a git server, and upon finding that there is no specific daemon needed at all (just an SSH server with a filesystem behind it), I started to look more on how git manages files under the hood. The strategy of how each comm...
The git data structures are immutable, except refs (i.e. branches/tags/etc), and "rewriting history" is not very correct term, more appropriate "creating alternative history". The repo will have all objects - new and old. Moreover, all the changes created in a local repository, during "push" objects are just transferre...
19631432
How can I add a different Git diff tool for PDF?
10
2013-10-28 09:42:34
<p>I currently use <code>meld</code> as a Git diff tool. This works great, but I also have some PDF files under version control. Always when I make <code>git diff</code> I get ugly messages that inform me, that meld can't compare those binary files.</p> <p>Today, I've found <code>diffpdf</code> which works great. But ...
3,935
562,769
2014-11-10 20:42:27
19,639,451
12
2013-10-28 15:56:37
1,253,222
2013-10-28 15:56:37
https://stackoverflow.com/q/19631432
https://stackoverflow.com/a/19639451
<p>You need to look at the <code>gitattributes</code> manual page. Basically, you create an external diff driver that specifies a custom command to use for comparing a specific type of file (this goes in <code>~/.gitconfig</code> or <code>${PROJECT}/.git/config</code>):</p> <pre><code>[diff "pdfdiff"] command = di...
<p>You need to look at the <code>gitattributes</code> manual page. Basically, you create an external diff driver that specifies a custom command to use for comparing a specific type of file (this goes in <code>~/.gitconfig</code> or <code>${PROJECT}/.git/config</code>):</p> <pre><code>[diff "pdfdiff"] command = di...
90, 119
git, pdf
<h1>How can I add a different Git diff tool for PDF?</h1> <p>I currently use <code>meld</code> as a Git diff tool. This works great, but I also have some PDF files under version control. Always when I make <code>git diff</code> I get ugly messages that inform me, that meld can't compare those binary files.</p> <p>Toda...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
23,053
git
# How can I add a different Git diff tool for PDF? I currently use `meld` as a Git diff tool. This works great, but I also have some PDF files under version control. Always when I make `git diff` I get ugly messages that inform me, that meld can't compare those binary files. Today, I've found `diffpdf` which works gr...
You need to look at the `gitattributes` manual page. Basically, you create an external diff driver that specifies a custom command to use for comparing a specific type of file (this goes in `~/.gitconfig` or `${PROJECT}/.git/config`): ``` [diff "pdfdiff"] command = diffpdf ``` Then you specify that certain types ...
18916278
How to get a nth git log in a branch
10
2013-09-20 12:00:38
<p>git log -1 shows last commit and git log -2 shows last two commit ; How can get log for a single commit in history.</p> <pre><code> commit 1 commit 2 commit 3 commit 4 </code></pre> <p>How to get just one commit in history so that I can see just commit 3, how to get lets say just </p> <pre><code> ...
2,391
388,445
2018-04-05 08:24:08
18,916,395
12
2013-09-20 12:06:20
112,968
2013-09-20 12:06:20
https://stackoverflow.com/q/18916278
https://stackoverflow.com/a/18916395
<p>You can <a href="https://www.kernel.org/pub/software/scm/git/docs/gitrevisions.html">specify a revision</a> in the past using the <code>~</code> suffix:</p> <pre><code>git show HEAD~4 git log -1 HEAD~4 </code></pre> <p>will show the 4th-last commit starting from HEAD.</p> <p>Another way of specifying the same rev...
<p>You can <a href="https://www.kernel.org/pub/software/scm/git/docs/gitrevisions.html">specify a revision</a> in the past using the <code>~</code> suffix:</p> <pre><code>git show HEAD~4 git log -1 HEAD~4 </code></pre> <p>will show the 4th-last commit starting from HEAD.</p> <p>Another way of specifying the same rev...
119
git
<h1>How to get a nth git log in a branch</h1> <p>git log -1 shows last commit and git log -2 shows last two commit ; How can get log for a single commit in history.</p> <pre><code> commit 1 commit 2 commit 3 commit 4 </code></pre> <p>How to get just one commit in history so that I can see just commit 3...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
23,054
git
# How to get a nth git log in a branch git log -1 shows last commit and git log -2 shows last two commit ; How can get log for a single commit in history. ``` commit 1 commit 2 commit 3 commit 4 ``` How to get just one commit in history so that I can see just commit 3, how to get lets say just ``` ...
You can [specify a revision](https://www.kernel.org/pub/software/scm/git/docs/gitrevisions.html) in the past using the `~` suffix: ``` git show HEAD~4 git log -1 HEAD~4 ``` will show the 4th-last commit starting from HEAD. Another way of specifying the same revision is `HEAD^^^^`
18798762
Git Transfer Protocol Specifications
10
2013-09-14 05:48:24
<p>I'm playing around with <a href="http://git-scm.com/book/en/Git-Internals-Transfer-Protocols" rel="noreferrer">git's transfer protocols</a>, and I was just wondering if there is some detailed specification for them before I attempt to read the source?</p>
4,500
220,710
2018-05-10 13:25:16
18,799,460
12
2013-09-14 07:34:25
6,309
2018-05-10 13:25:16
https://stackoverflow.com/q/18798762
https://stackoverflow.com/a/18799460
<p>Update May 2018: Starting Q2 2018 and Git 2.18, you will have the <strong>Git transfer protocol v2</strong>: See "<a href="https://stackoverflow.com/a/50273976/6309">How does Git's transfer protocol work</a>".</p> <hr> <p>Original answer 2013:</p> <p>First, check the git documentation in the git repo itself (with...
<p>Update May 2018: Starting Q2 2018 and Git 2.18, you will have the <strong>Git transfer protocol v2</strong>: See "<a href="https://stackoverflow.com/a/50273976/6309">How does Git's transfer protocol work</a>".</p> <hr> <p>Original answer 2013:</p> <p>First, check the git documentation in the git repo itself (with...
119
git
<h1>Git Transfer Protocol Specifications</h1> <p>I'm playing around with <a href="http://git-scm.com/book/en/Git-Internals-Transfer-Protocols" rel="noreferrer">git's transfer protocols</a>, and I was just wondering if there is some detailed specification for them before I attempt to read the source?</p>
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
23,055
git
# Git Transfer Protocol Specifications I'm playing around with [git's transfer protocols](http://git-scm.com/book/en/Git-Internals-Transfer-Protocols), and I was just wondering if there is some detailed specification for them before I attempt to read the source?
Update May 2018: Starting Q2 2018 and Git 2.18, you will have the **Git transfer protocol v2**: See "[How does Git's transfer protocol work](https://stackoverflow.com/a/50273976/6309)". --- Original answer 2013: First, check the git documentation in the git repo itself (with a [good grep](https://stackoverflow.com/a...
17316906
Git merge in the wrong direction?
10
2013-06-26 09:54:51
<p>Git still confuses me from time to time!</p> <p>I have a staging and a master branch. Usually development occurs on the staging branch, which gets merged into master periodically.</p> <p>However some commits have been made directly to the master branch. This means that the updates are missing from the staging bran...
3,136
716,294
2013-06-27 04:51:25
17,326,954
12
2013-06-26 17:43:22
46,194
2013-06-26 17:59:35
https://stackoverflow.com/q/17316906
https://stackoverflow.com/a/17326954
<p>I think it is a perfectly reasonable process to merge <code>master</code> into <code>staging</code> every now and then. This brings <code>staging</code> up to date with the latest patches in master. </p> <p>You can keep developing on <code>staging</code> after that, occasionally bringing it up to date again with a ...
<p>I think it is a perfectly reasonable process to merge <code>master</code> into <code>staging</code> every now and then. This brings <code>staging</code> up to date with the latest patches in master. </p> <p>You can keep developing on <code>staging</code> after that, occasionally bringing it up to date again with a ...
119
git
<h1>Git merge in the wrong direction?</h1> <p>Git still confuses me from time to time!</p> <p>I have a staging and a master branch. Usually development occurs on the staging branch, which gets merged into master periodically.</p> <p>However some commits have been made directly to the master branch. This means that th...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
23,058
git
# Git merge in the wrong direction? Git still confuses me from time to time! I have a staging and a master branch. Usually development occurs on the staging branch, which gets merged into master periodically. However some commits have been made directly to the master branch. This means that the updates are missing f...
I think it is a perfectly reasonable process to merge `master` into `staging` every now and then. This brings `staging` up to date with the latest patches in master. You can keep developing on `staging` after that, occasionally bringing it up to date again with a merge. When `staging` has reached a stable state, you ...
16452656
Can git list the tags that occur between two particular commits?
10
2013-05-09 00:57:33
<p>Is there a way to get git to list all the tags that were added in between two commits? That is, only show me the tags that appear between point A and point B.</p>
1,661
147,937
2020-08-20 22:24:01
16,452,945
12
2013-05-09 01:33:48
2,352,473
2013-05-09 01:33:48
https://stackoverflow.com/q/16452656
https://stackoverflow.com/a/16452945
<p>You can use the <code>git log</code> command with these options:</p> <pre><code>git log tagA...tagB --decorate --simplify-by-decoration </code></pre> <p><code>--decorate</code> displays the tag names next to the commit, and <code>--simplify-by-decoration</code> shows only commits that have been tagged.</p>
<p>You can use the <code>git log</code> command with these options:</p> <pre><code>git log tagA...tagB --decorate --simplify-by-decoration </code></pre> <p><code>--decorate</code> displays the tag names next to the commit, and <code>--simplify-by-decoration</code> shows only commits that have been tagged.</p>
115, 119, 5597
commit, git, tags
<h1>Can git list the tags that occur between two particular commits?</h1> <p>Is there a way to get git to list all the tags that were added in between two commits? That is, only show me the tags that appear between point A and point B.</p>
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
23,059
git
# Can git list the tags that occur between two particular commits? Is there a way to get git to list all the tags that were added in between two commits? That is, only show me the tags that appear between point A and point B.
You can use the `git log` command with these options: ``` git log tagA...tagB --decorate --simplify-by-decoration ``` `--decorate` displays the tag names next to the commit, and `--simplify-by-decoration` shows only commits that have been tagged.
13586502
How to Check if A Git Clone Has Been Done Already with JGit
10
2012-11-27 14:34:21
<p>I learning git and using JGit to access Git repos from java code. Git by default does not allow to clone to a non-empty directory. How do we figure out that a git clone has already been done for a particular git repo in the local machine so that we can only do a Git pull subsequently?</p> <p>Currently I'm using thi...
5,875
337,962
2021-06-10 17:46:30
13,606,879
12
2012-11-28 14:03:03
337,962
2012-11-28 14:03:03
https://stackoverflow.com/q/13586502
https://stackoverflow.com/a/13606879
<p>This is the approach I used, as specified in the Jgit mailing list:</p> <p>Check if a git repository is existing:</p> <pre><code>if (RepositoryCache.FileKey.isGitRepository(new File(&lt;path_to_repo&gt;), FS.DETECTED)) { // Already cloned. Just need to open a repository here. } else { // Not present or...
<p>This is the approach I used, as specified in the Jgit mailing list:</p> <p>Check if a git repository is existing:</p> <pre><code>if (RepositoryCache.FileKey.isGitRepository(new File(&lt;path_to_repo&gt;), FS.DETECTED)) { // Already cloned. Just need to open a repository here. } else { // Not present or...
17, 119, 34099, 61058
git, git-clone, java, jgit
<h1>How to Check if A Git Clone Has Been Done Already with JGit</h1> <p>I learning git and using JGit to access Git repos from java code. Git by default does not allow to clone to a non-empty directory. How do we figure out that a git clone has already been done for a particular git repo in the local machine so that we...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
23,060
git
# How to Check if A Git Clone Has Been Done Already with JGit I learning git and using JGit to access Git repos from java code. Git by default does not allow to clone to a non-empty directory. How do we figure out that a git clone has already been done for a particular git repo in the local machine so that we can only...
This is the approach I used, as specified in the Jgit mailing list: Check if a git repository is existing: ``` if (RepositoryCache.FileKey.isGitRepository(new File(<path_to_repo>), FS.DETECTED)) { // Already cloned. Just need to open a repository here. } else { // Not present or not a Git repository. } ``...
11478558
FETCH_HEAD reference not updating correctly after "git fetch"
10
2012-07-13 21:20:59
<p>I have a local repository that pulls from a remote one. Running <code>git pull</code> as well as <code>git fetch; git merge FETCH_HEAD</code> used to perform exactly the same action, as is expected from the <a href="http://git-scm.com/docs/git-pull" rel="noreferrer">description of <code>git pull</code></a>:</p> <bl...
8,194
214,373
2015-03-03 18:08:28
13,169,024
12
2012-10-31 23:45:58
214,373
2015-03-03 18:08:28
https://stackoverflow.com/q/11478558
https://stackoverflow.com/a/13169024
<p>Running <code>git fetch</code> without any options will fetch all references in the remotes and write them to the <code>.git/FETCH_HEAD</code> file. The contents of the file usualy looks something like this:</p> <pre><code>37301df96597ac037f8e7e846fea6fc7df77bea5 branch 'master' of github.com:user/repo 593539e8a98b...
<p>Running <code>git fetch</code> without any options will fetch all references in the remotes and write them to the <code>.git/FETCH_HEAD</code> file. The contents of the file usualy looks something like this:</p> <pre><code>37301df96597ac037f8e7e846fea6fc7df77bea5 branch 'master' of github.com:user/repo 593539e8a98b...
119, 18283
fetch, git
<h1>FETCH_HEAD reference not updating correctly after "git fetch"</h1> <p>I have a local repository that pulls from a remote one. Running <code>git pull</code> as well as <code>git fetch; git merge FETCH_HEAD</code> used to perform exactly the same action, as is expected from the <a href="http://git-scm.com/docs/git-pu...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
23,061
git
# FETCH_HEAD reference not updating correctly after "git fetch" I have a local repository that pulls from a remote one. Running `git pull` as well as `git fetch; git merge FETCH_HEAD` used to perform exactly the same action, as is expected from the [description of `git pull`](http://git-scm.com/docs/git-pull): > DESC...
Running `git fetch` without any options will fetch all references in the remotes and write them to the `.git/FETCH_HEAD` file. The contents of the file usualy looks something like this: ``` 37301df96597ac037f8e7e846fea6fc7df77bea5 branch 'master' of github.com:user/repo 593539e8a98ba5980d4b645db3b0f506bb9b6a2c not-for...
12223439
How to work around "multiple merge bases" error in EGit Eclipse plugin?
10
2012-08-31 23:03:09
<p>Using eclipse egit plugin I've encountered "multiple merge bases" exception. Before I've managed to resolve the situation, but this time nothing helps. Even after creating additional commits and branches, cherry pick. Repository branches seems blocked to merge.</p> <p>This is the exception:</p> <pre><code>An int...
22,008
null
2015-04-27 15:36:52
12,227,221
12
2012-09-01 11:11:33
305,973
2013-12-11 14:32:26
https://stackoverflow.com/q/12223439
https://stackoverflow.com/a/12227221
<h3>EGit</h3> <p>The recursive merge strategy needed for this is the default since EGit 3.0 (see <a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=380314" rel="noreferrer">bug 380314</a>).</p> <p>In case you are using an older version, see the <a href="http://eclipse.org/egit/" rel="noreferrer">download page</a>...
<h3>EGit</h3> <p>The recursive merge strategy needed for this is the default since EGit 3.0 (see <a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=380314" rel="noreferrer">bug 380314</a>).</p> <p>In case you are using an older version, see the <a href="http://eclipse.org/egit/" rel="noreferrer">download page</a>...
119, 717, 3885, 43702
eclipse-plugin, egit, git, merge
<h1>How to work around "multiple merge bases" error in EGit Eclipse plugin?</h1> <p>Using eclipse egit plugin I've encountered "multiple merge bases" exception. Before I've managed to resolve the situation, but this time nothing helps. Even after creating additional commits and branches, cherry pick. Repository branc...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
23,062
git
# How to work around "multiple merge bases" error in EGit Eclipse plugin? Using eclipse egit plugin I've encountered "multiple merge bases" exception. Before I've managed to resolve the situation, but this time nothing helps. Even after creating additional commits and branches, cherry pick. Repository branches seems b...
### EGit The recursive merge strategy needed for this is the default since EGit 3.0 (see [bug 380314](https://bugs.eclipse.org/bugs/show_bug.cgi?id=380314)). In case you are using an older version, see the [download page](http://eclipse.org/egit/) for upgrading. ### Workarounds Alternatively, try resetting to your ...
9615227
Source control in XCode is a nightmare - can anyone offer advice?
10
2012-03-08 09:19:03
<p>Using Git with Xcode (4.3) is a real nightmare.</p> <p>Here's a scenario...</p> <p>I want to add a new feature, so I create a new topic branch.</p> <p>I add my new feature and I'm ready to commit, rebase and merge...</p> <p>I commit my changes - fine.</p> <p>I jump back to master to pull changes (in case someon...
6,094
443,297
2015-03-09 04:50:37
9,615,334
12
2012-03-08 09:28:14
211,292
2015-03-09 04:50:37
https://stackoverflow.com/q/9615227
https://stackoverflow.com/a/9615334
<p>I just add those files to my <code>.gitignore</code> file. There is no need to share them with other developers.</p> <p>So I have:</p> <pre><code>*.xcworkspace </code></pre> <p>In .gitignore</p> <p>Note that the stackoverflow question you linked to says to not exclude <code>project.pbxproj</code>, but it doesn't...
<p>I just add those files to my <code>.gitignore</code> file. There is no need to share them with other developers.</p> <p>So I have:</p> <pre><code>*.xcworkspace </code></pre> <p>In .gitignore</p> <p>Note that the stackoverflow question you linked to says to not exclude <code>project.pbxproj</code>, but it doesn't...
119, 456, 58338, 59704
git, ios, version-control, xcode4
<h1>Source control in XCode is a nightmare - can anyone offer advice?</h1> <p>Using Git with Xcode (4.3) is a real nightmare.</p> <p>Here's a scenario...</p> <p>I want to add a new feature, so I create a new topic branch.</p> <p>I add my new feature and I'm ready to commit, rebase and merge...</p> <p>I commit my ch...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
23,064
git
# Source control in XCode is a nightmare - can anyone offer advice? Using Git with Xcode (4.3) is a real nightmare. Here's a scenario... I want to add a new feature, so I create a new topic branch. I add my new feature and I'm ready to commit, rebase and merge... I commit my changes - fine. I jump back to master ...
I just add those files to my `.gitignore` file. There is no need to share them with other developers. So I have: ``` *.xcworkspace ``` In .gitignore Note that the stackoverflow question you linked to says to not exclude `project.pbxproj`, but it doesn't say not to exclude `*.xcworkspace`. However, I'm not using th...
7501646
JGit: Retrieve tag associated with a git commit
10
2011-09-21 14:35:39
<p>I want to use JGit API to retrieve the tags associated with a specific commit hash (if there is any)?</p> <p>Please provide code snippet for the same.</p>
6,966
957,193
2023-08-22 13:52:05
7,503,390
12
2011-09-21 16:37:06
957,130
2015-07-03 08:39:38
https://stackoverflow.com/q/7501646
https://stackoverflow.com/a/7503390
<p><a href="http://book.git-scm.com/1_the_git_object_model.html" rel="noreferrer">Git object model</a> describes tag as an object containing information about specific object ie. commit (among other things) thus it's impossible in pure git to get information you want (commit object don't have information about relate...
<p><a href="http://book.git-scm.com/1_the_git_object_model.html" rel="noreferrer">Git object model</a> describes tag as an object containing information about specific object ie. commit (among other things) thus it's impossible in pure git to get information you want (commit object don't have information about relate...
61058
jgit
<h1>JGit: Retrieve tag associated with a git commit</h1> <p>I want to use JGit API to retrieve the tags associated with a specific commit hash (if there is any)?</p> <p>Please provide code snippet for the same.</p>
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
23,065
git
# JGit: Retrieve tag associated with a git commit I want to use JGit API to retrieve the tags associated with a specific commit hash (if there is any)? Please provide code snippet for the same.
[Git object model](http://book.git-scm.com/1_the_git_object_model.html) describes tag as an object containing information about specific object ie. commit (among other things) thus it's impossible in pure git to get information you want (commit object don't have information about related tags). This should be done "bac...
2730411
git - remove file from the repository
10
2010-04-28 14:36:30
<p>I know there's a million similar questions already, but I'm not sure they apply. I am new to <code>git</code>, and have a project hosted on github. I accidentally added some big log files to the repository. When I noticed it, I <code>git rm</code>-ed them and then <code>commit</code>-ted the changes. That seems to h...
4,614
314,686
2010-04-28 14:44:55
2,730,486
12
2010-04-28 14:44:55
6,309
2010-04-28 14:44:55
https://stackoverflow.com/q/2730411
https://stackoverflow.com/a/2730486
<p>You could try and follow the <strong><a href="http://help.github.com/removing-sensitive-data/" rel="noreferrer">GitHub guide "remove sensitive data"</a></strong></p> <blockquote> <p>From time to time users accidentally commit data like passwords or keys into a git repo. While you can use <code>git rm</code> to re...
<p>You could try and follow the <strong><a href="http://help.github.com/removing-sensitive-data/" rel="noreferrer">GitHub guide "remove sensitive data"</a></strong></p> <blockquote> <p>From time to time users accidentally commit data like passwords or keys into a git repo. While you can use <code>git rm</code> to re...
119
git
<h1>git - remove file from the repository</h1> <p>I know there's a million similar questions already, but I'm not sure they apply. I am new to <code>git</code>, and have a project hosted on github. I accidentally added some big log files to the repository. When I noticed it, I <code>git rm</code>-ed them and then <code...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
23,067
git
# git - remove file from the repository I know there's a million similar questions already, but I'm not sure they apply. I am new to `git`, and have a project hosted on github. I accidentally added some big log files to the repository. When I noticed it, I `git rm`-ed them and then `commit`-ted the changes. That seems...
You could try and follow the **[GitHub guide "remove sensitive data"](http://help.github.com/removing-sensitive-data/)** > From time to time users accidentally commit data like passwords or keys into a git repo. While you can use `git rm` to remove the file, it will still be in the repo’s history. Fortunately, git mak...
883878
Update website with a single command (git push) instead of FTP drag and dropping
10
2009-05-19 16:49:44
<p>Situation:</p> <ul> <li>I have a local copy of a website</li> <li>I have a server that I have SSH access to</li> </ul> <p>What do I want to do?</p> <ul> <li>Commit locally until I'm happy with my code</li> <li>Make branches locally</li> <li>Have one master branch that is the one that should be pushed to the serve...
6,903
99,981
2015-01-28 01:43:34
884,231
12
2009-05-19 18:03:33
36,330
2009-05-19 18:37:47
https://stackoverflow.com/q/883878
https://stackoverflow.com/a/884231
<p>You need to write a post-receive hook that runs <code>git checkout -f</code> after the remote git repository receives a push. See <a href="http://toroid.org/ams/git-website-howto" rel="noreferrer">Using Git to manage a web site</a> for details.</p>
<p>You need to write a post-receive hook that runs <code>git checkout -f</code> after the remote git repository receives a push. See <a href="http://toroid.org/ams/git-website-howto" rel="noreferrer">Using Git to manage a web site</a> for details.</p>
119, 456, 758, 4658
git, system-administration, version-control, workflow
<h1>Update website with a single command (git push) instead of FTP drag and dropping</h1> <p>Situation:</p> <ul> <li>I have a local copy of a website</li> <li>I have a server that I have SSH access to</li> </ul> <p>What do I want to do?</p> <ul> <li>Commit locally until I'm happy with my code</li> <li>Make branches ...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
23,068
git
# Update website with a single command (git push) instead of FTP drag and dropping Situation: - I have a local copy of a website - I have a server that I have SSH access to What do I want to do? - Commit locally until I'm happy with my code - Make branches locally - Have one master branch that is the one that shoul...
You need to write a post-receive hook that runs `git checkout -f` after the remote git repository receives a push. See [Using Git to manage a web site](http://toroid.org/ams/git-website-howto) for details.
199728
Setting gc.refLogExpire
10
2008-10-14 01:37:52
<p>How do I set gc.reflogExpire so that items will never expire?<br> What other time interval formats does it accept?</p> <p>The man page says that you can set it to "90 days or 3 months," but doesn't specify what format it expects.</p>
1,605
4,883
2024-10-06 10:18:00
202,947
12
2008-10-14 21:38:14
19,563
2024-10-06 10:18:00
https://stackoverflow.com/q/199728
https://stackoverflow.com/a/202947
<p>Setting gc.refLogExpire to &quot;never&quot; should do the trick.</p> <pre><code>git config --global gc.reflogExpire &quot;never&quot; </code></pre>
<p>Setting gc.refLogExpire to &quot;never&quot; should do the trick.</p> <pre><code>git config --global gc.reflogExpire &quot;never&quot; </code></pre>
119
git
<h1>Setting gc.refLogExpire</h1> <p>How do I set gc.reflogExpire so that items will never expire?<br> What other time interval formats does it accept?</p> <p>The man page says that you can set it to "90 days or 3 months," but doesn't specify what format it expects.</p>
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
23,069
git
# Setting gc.refLogExpire How do I set gc.reflogExpire so that items will never expire? What other time interval formats does it accept? The man page says that you can set it to "90 days or 3 months," but doesn't specify what format it expects.
Setting gc.refLogExpire to "never" should do the trick. ``` git config --global gc.reflogExpire "never" ```
69056041
Is it dangerous to put a Git directory in a drive sync tool?
9
2021-09-04 14:05:40
<p>I love to use Google Drive for Desktop. I love to put everything in the cloud since centralizing everything makes things organized.</p> <p>However, is a Git directory dangerous to be in such syncing drive?</p> <p>Definition of dangerous:</p> <ol> <li><p>Inconsistency of &quot;.git&quot; with &quot;all tracking files...
3,540
10,189,759
2023-08-25 19:51:08
69,056,193
12
2021-09-04 14:27:00
159,145
2021-09-04 16:29:06
https://stackoverflow.com/q/69056041
https://stackoverflow.com/a/69056193
<blockquote> <p>I love to put everything in the cloud since centralize everything makes things organized.</p> </blockquote> <p><sub>Personally, I generally avoid folder-sync services or <a href="https://medium.com/@storjproject/there-is-no-cloud-it-s-just-someone-else-s-computer-6ecc37cdcfe5" rel="noreferrer">cloud hos...
<blockquote> <p>I love to put everything in the cloud since centralize everything makes things organized.</p> </blockquote> <p><sub>Personally, I generally avoid folder-sync services or <a href="https://medium.com/@storjproject/there-is-no-cloud-it-s-just-someone-else-s-computer-6ecc37cdcfe5" rel="noreferrer">cloud hos...
119
git
<h1>Is it dangerous to put a Git directory in a drive sync tool?</h1> <p>I love to use Google Drive for Desktop. I love to put everything in the cloud since centralizing everything makes things organized.</p> <p>However, is a Git directory dangerous to be in such syncing drive?</p> <p>Definition of dangerous:</p> <ol> ...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
23,076
git
# Is it dangerous to put a Git directory in a drive sync tool? I love to use Google Drive for Desktop. I love to put everything in the cloud since centralizing everything makes things organized. However, is a Git directory dangerous to be in such syncing drive? Definition of dangerous: 1. Inconsistency of ".git" wi...
> I love to put everything in the cloud since centralize everything makes things organized. Personally, I generally avoid folder-sync services or [cloud hosted](https://medium.com/@storjproject/there-is-no-cloud-it-s-just-someone-else-s-computer-6ecc37cdcfe5) folders (like OneDrive, Google Drive, DropBox, etc) because...
61079178
How to include git branch in installing from requirements in Python?
9
2020-04-07 11:36:52
<p>Hi I need to install from a branch of a git repo. I want to include it on the requirements.txt so that it would install using the command <code>pip install -r requirements.txt</code></p> <p>What I know is how to install from master branch (See git ssh entry below):</p> <p>This is my <code>requirements.txt</code></...
7,808
9,879,869
2023-03-17 14:57:51
61,079,421
12
2020-04-07 11:51:42
2,427,222
2023-03-17 14:57:51
https://stackoverflow.com/q/61079178
https://stackoverflow.com/a/61079421
<p>According to the <a href="https://pip.pypa.io/en/stable/topics/vcs-support/#git" rel="nofollow noreferrer">document</a>, you can add branch name or commit hash after <code>@</code>:</p> <pre><code>git+ssh://git@gitlab.com/project/project-utils.git@1-fix-test </code></pre>
<p>According to the <a href="https://pip.pypa.io/en/stable/topics/vcs-support/#git" rel="nofollow noreferrer">document</a>, you can add branch name or commit hash after <code>@</code>:</p> <pre><code>git+ssh://git@gitlab.com/project/project-utils.git@1-fix-test </code></pre>
16, 119, 5119, 38755, 86288
git, pip, python, python-install, requirements.txt
<h1>How to include git branch in installing from requirements in Python?</h1> <p>Hi I need to install from a branch of a git repo. I want to include it on the requirements.txt so that it would install using the command <code>pip install -r requirements.txt</code></p> <p>What I know is how to install from master branch...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
23,079
git
# How to include git branch in installing from requirements in Python? Hi I need to install from a branch of a git repo. I want to include it on the requirements.txt so that it would install using the command `pip install -r requirements.txt` What I know is how to install from master branch (See git ssh entry below):...
According to the [document](https://pip.pypa.io/en/stable/topics/vcs-support/#git), you can add branch name or commit hash after `@`: ``` git+ssh://git@gitlab.com/project/project-utils.git@1-fix-test ```
53234798
Can I rebase on a branch's fork point without explicitly specifying the parent?
9
2018-11-10 00:01:02
<p>I often use <code>git rebase -i</code> to clean up my history before publishing it. Usually I want to edit commits back to wherever the current branch forked off, without changing its fork point. I do it something like this: <code>git rebase -i $(git show-branch --merge-base $PARENT_BRANCH HEAD)</code></p> <p>It's ...
4,882
4,638,839
2022-11-05 23:42:59
58,252,582
12
2019-10-05 21:47:18
6,309
2022-11-05 23:42:59
https://stackoverflow.com/q/53234798
https://stackoverflow.com/a/58252582
<p>With Git 2.24 (Q4 2019), no more <code>git rebase -i --onto @{upstream}...HEAD</code></p> <p>The new &quot;<code>git rebase --keep-base &lt;upstream&gt;</code>&quot; tries to find the original base of the topic being rebased and <strong>rebase on top of that same base</strong>, which is useful when running the &quot...
<p>With Git 2.24 (Q4 2019), no more <code>git rebase -i --onto @{upstream}...HEAD</code></p> <p>The new &quot;<code>git rebase --keep-base &lt;upstream&gt;</code>&quot; tries to find the original base of the topic being rebased and <strong>rebase on top of that same base</strong>, which is useful when running the &quot...
119
git
<h1>Can I rebase on a branch's fork point without explicitly specifying the parent?</h1> <p>I often use <code>git rebase -i</code> to clean up my history before publishing it. Usually I want to edit commits back to wherever the current branch forked off, without changing its fork point. I do it something like this: <co...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
23,081
git
# Can I rebase on a branch's fork point without explicitly specifying the parent? I often use `git rebase -i` to clean up my history before publishing it. Usually I want to edit commits back to wherever the current branch forked off, without changing its fork point. I do it something like this: `git rebase -i $(git sh...
With Git 2.24 (Q4 2019), no more `git rebase -i --onto @{upstream}...HEAD` The new "`git rebase --keep-base <upstream>`" tries to find the original base of the topic being rebased and **rebase on top of that same base**, which is useful when running the "`git rebase -i`" (and its limited variant "`git rebase -x`"). T...
56184170
CI/CD pipelines Azure devops automatic merge after deploy release
9
2019-05-17 10:06:22
<p>I have a classic env. setup like following:</p> <p>I have 2 branches: <code>Develop</code> and <code>Master</code>.</p> <p>Is there any way in Azure DevOps to setup the following <strong>rule:</strong></p> <ol> <li><p>When a deploy is succeeded on dev environment (defined in the release pipeline of azure devops) ...
20,887
1,109,890
2022-09-21 11:47:34
56,211,646
12
2019-05-19 20:15:29
7,409,220
2019-08-04 14:15:36
https://stackoverflow.com/q/56184170
https://stackoverflow.com/a/56211646
<h2>Edit:</h2> <p><strong>I just uploaded an extension that does it:</strong> <a href="https://marketplace.visualstudio.com/items?itemName=ShaykiAbramczyk.CreatePullRequest" rel="noreferrer">https://marketplace.visualstudio.com/items?itemName=ShaykiAbramczyk.CreatePullRequest</a></p> <hr /> <p>You can use <a href="http...
<h2>Edit:</h2> <p><strong>I just uploaded an extension that does it:</strong> <a href="https://marketplace.visualstudio.com/items?itemName=ShaykiAbramczyk.CreatePullRequest" rel="noreferrer">https://marketplace.visualstudio.com/items?itemName=ShaykiAbramczyk.CreatePullRequest</a></p> <hr /> <p>You can use <a href="http...
119, 1066, 48063, 116537, 119596
azure-devops, azure-pipelines, continuous-deployment, continuous-integration, git
<h1>CI/CD pipelines Azure devops automatic merge after deploy release</h1> <p>I have a classic env. setup like following:</p> <p>I have 2 branches: <code>Develop</code> and <code>Master</code>.</p> <p>Is there any way in Azure DevOps to setup the following <strong>rule:</strong></p> <ol> <li><p>When a deploy is succ...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
23,083
git
# CI/CD pipelines Azure devops automatic merge after deploy release I have a classic env. setup like following: I have 2 branches: `Develop` and `Master`. Is there any way in Azure DevOps to setup the following **rule:** 1. When a deploy is succeeded on dev environment (defined in the release pipeline of azure d...
## Edit: **I just uploaded an extension that does it:** <https://marketplace.visualstudio.com/items?itemName=ShaykiAbramczyk.CreatePullRequest> --- You can use [Azure DevOps Rest API](https://learn.microsoft.com/en-us/rest/api/azure/devops/?view=azure-devops-rest-5.0) to create a Pull Request, so in the end of the B...
51637589
Jenkins Pipeline throwing java.io.NotSerializableException: org.jenkinsci.plugins.workflow.job.WorkflowRun even with @NonCPS
9
2018-08-01 15:53:31
<p>The code is fairly simple I just want a rev-list to post to slack. But the part that is causing me the issue is when I am actually trying to get the rev-list from git. </p> <p>Problem Code </p> <pre><code>@NonCPS def getRevisionList(currentCommit, lastSuccessfulCommit) { def commits = sh( script: "git...
14,624
10,072,423
2018-08-01 17:46:09
51,638,793
12
2018-08-01 17:07:56
2,194,470
2018-08-01 17:46:09
https://stackoverflow.com/q/51637589
https://stackoverflow.com/a/51638793
<p>The exception you see is caused by the following line:</p> <pre><code>def currentBuild = currentBuild.rawBuild </code></pre> <p><code>currentBuild.rawBuild</code> returns a non-serializable object, thus has to be called inside a <code>@NonCPS</code> method to avoid getting this exception. Try simplifying your help...
<p>The exception you see is caused by the following line:</p> <pre><code>def currentBuild = currentBuild.rawBuild </code></pre> <p><code>currentBuild.rawBuild</code> returns a non-serializable object, thus has to be called inside a <code>@NonCPS</code> method to avoid getting this exception. Try simplifying your help...
119, 849, 118285
git, groovy, jenkins-pipeline
<h1>Jenkins Pipeline throwing java.io.NotSerializableException: org.jenkinsci.plugins.workflow.job.WorkflowRun even with @NonCPS</h1> <p>The code is fairly simple I just want a rev-list to post to slack. But the part that is causing me the issue is when I am actually trying to get the rev-list from git. </p> <p>Proble...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
23,084
git
# Jenkins Pipeline throwing java.io.NotSerializableException: org.jenkinsci.plugins.workflow.job.WorkflowRun even with @NonCPS The code is fairly simple I just want a rev-list to post to slack. But the part that is causing me the issue is when I am actually trying to get the rev-list from git. Problem Code ``` @NonC...
The exception you see is caused by the following line: ``` def currentBuild = currentBuild.rawBuild ``` `currentBuild.rawBuild` returns a non-serializable object, thus has to be called inside a `@NonCPS` method to avoid getting this exception. Try simplifying your helper methods so they access `currentBuild` variable...
49499074
Is there a way to create aliases for only certain directories?
9
2018-03-26 19:20:17
<p>I'm looking for a way to assign an alias that only operates in a single folder, and is easily transferable via git.</p> <p>I'm imagining some sort of <code>.aliases</code> file where I can create things like <code>ALIAS test=pytest[....]</code> that will be picked up by others when they pull from this repo.</p> <p...
4,635
4,514,236
2018-03-26 20:24:43
49,499,594
12
2018-03-26 19:55:22
578,288
2018-03-26 20:24:43
https://stackoverflow.com/q/49499074
https://stackoverflow.com/a/49499594
<p>This is not possible natively. This is mainly for security reasons – you wouldn’t want to download a project, <code>cd</code> into its directory, and have it overwrite the <code>ls</code> command so that <code>ls</code> uploads all your files to a hacker.</p> <p>There is a tool <a href="https://direnv.net/" rel="no...
<p>This is not possible natively. This is mainly for security reasons – you wouldn’t want to download a project, <code>cd</code> into its directory, and have it overwrite the <code>ls</code> command so that <code>ls</code> uploads all your files to a hacker.</p> <p>There is a tool <a href="https://direnv.net/" rel="no...
34, 119, 369
git, macos, unix
<h1>Is there a way to create aliases for only certain directories?</h1> <p>I'm looking for a way to assign an alias that only operates in a single folder, and is easily transferable via git.</p> <p>I'm imagining some sort of <code>.aliases</code> file where I can create things like <code>ALIAS test=pytest[....]</code>...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
23,085
git
# Is there a way to create aliases for only certain directories? I'm looking for a way to assign an alias that only operates in a single folder, and is easily transferable via git. I'm imagining some sort of `.aliases` file where I can create things like `ALIAS test=pytest[....]` that will be picked up by others when...
This is not possible natively. This is mainly for security reasons – you wouldn’t want to download a project, `cd` into its directory, and have it overwrite the `ls` command so that `ls` uploads all your files to a hacker. There is a tool [`direnv`](https://direnv.net/) for Mac and Linux that automatically loads envir...
45139863
How to make my branch be identical to its correspondent remote branch ?
9
2017-07-17 08:58:09
<p>This post follows my previous post about git pull: <a href="https://stackoverflow.com/questions/45137769/git-what-does-exactly-git-pull-do/45138435#45138435">Git: What does EXACTLY &quot;git pull&quot; do?</a></p> <p>Let's say that I want to do "git pull" to a certain branch and I want that my local copy of this br...
2,339
5,402,618
2017-07-17 10:12:16
45,141,032
12
2017-07-17 09:52:47
212,858
2017-07-17 09:52:47
https://stackoverflow.com/q/45139863
https://stackoverflow.com/a/45141032
<p>Assuming you're already on the branch in question (and it's tracking the upstream correctly), the simplest way is</p> <pre><code>git fetch &amp;&amp; git reset --hard FETCH_HEAD </code></pre> <p>This uses the special <code>FETCH_HEAD</code> ref so you don't need to type the upstream branch name or anything else.</...
<p>Assuming you're already on the branch in question (and it's tracking the upstream correctly), the simplest way is</p> <pre><code>git fetch &amp;&amp; git reset --hard FETCH_HEAD </code></pre> <p>This uses the special <code>FETCH_HEAD</code> ref so you don't need to type the upstream branch name or anything else.</...
119
git
<h1>How to make my branch be identical to its correspondent remote branch ?</h1> <p>This post follows my previous post about git pull: <a href="https://stackoverflow.com/questions/45137769/git-what-does-exactly-git-pull-do/45138435#45138435">Git: What does EXACTLY &quot;git pull&quot; do?</a></p> <p>Let's say that I w...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
23,088
git
# How to make my branch be identical to its correspondent remote branch ? This post follows my previous post about git pull: [Git: What does EXACTLY "git pull" do?](https://stackoverflow.com/questions/45137769/git-what-does-exactly-git-pull-do/45138435#45138435) Let's say that I want to do "git pull" to a certain bra...
Assuming you're already on the branch in question (and it's tracking the upstream correctly), the simplest way is ``` git fetch && git reset --hard FETCH_HEAD ``` This uses the special `FETCH_HEAD` ref so you don't need to type the upstream branch name or anything else.
41482898
Git seems to store the whole file instead of diff, how to avoid that?
9
2017-01-05 10:42:26
<p>I have a "large" (5 mb) text file in a git repo. If I add a character at the last line and run <code>git add</code> my .git folder increases in size with approx 1 mb (which I assume is the compressed size of my 5 mb file).</p> <p>The same happens for each time I edit and add.</p> <p>If I run <code>git add -p file<...
2,438
410,509
2021-03-04 07:16:09
41,484,463
12
2017-01-05 11:54:59
1,256,452
2017-01-05 11:54:59
https://stackoverflow.com/q/41482898
https://stackoverflow.com/a/41484463
<p>Git stores all files as "objects" (specifically, as <em>blob objects</em>, with blobs being one of the four possible object types in Git). But this is not the whole story.</p> <p>Each object is uniquely identified by its contents. The contents of the object are turned into a cryptographic hash (specifically, SHA-...
<p>Git stores all files as "objects" (specifically, as <em>blob objects</em>, with blobs being one of the four possible object types in Git). But this is not the whole story.</p> <p>Each object is uniquely identified by its contents. The contents of the object are turned into a cryptographic hash (specifically, SHA-...
119
git
<h1>Git seems to store the whole file instead of diff, how to avoid that?</h1> <p>I have a "large" (5 mb) text file in a git repo. If I add a character at the last line and run <code>git add</code> my .git folder increases in size with approx 1 mb (which I assume is the compressed size of my 5 mb file).</p> <p>The sam...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
23,091
git
# Git seems to store the whole file instead of diff, how to avoid that? I have a "large" (5 mb) text file in a git repo. If I add a character at the last line and run `git add` my .git folder increases in size with approx 1 mb (which I assume is the compressed size of my 5 mb file). The same happens for each time I e...
Git stores all files as "objects" (specifically, as *blob objects*, with blobs being one of the four possible object types in Git). But this is not the whole story. Each object is uniquely identified by its contents. The contents of the object are turned into a cryptographic hash (specifically, SHA-1, with the raw con...
40840767
Git diff tool reset to git default
9
2016-11-28 09:20:09
<p>I accidentally changed my git diff tool and it was not actually installed and I have no permissions over the machine. How can I revert to the original tool that shows changes in command line? It may sound silly but I have not been able to make a single diff and I have found no information about this, only on how to ...
5,409
293,420
2019-03-08 10:43:44
40,841,193
12
2016-11-28 09:42:41
2,890,575
2019-03-08 10:43:44
https://stackoverflow.com/q/40840767
https://stackoverflow.com/a/40841193
<p>This depends on how you changed your git diff tool config when run <code>git config</code>.</p> <ul> <li><p>If you used --system, your configuration will have been written to system-wide $(prefix)/etc/gitconfig</p></li> <li><p>If you used --global, your configuration will have been written to global ~/.gitconfig fi...
<p>This depends on how you changed your git diff tool config when run <code>git config</code>.</p> <ul> <li><p>If you used --system, your configuration will have been written to system-wide $(prefix)/etc/gitconfig</p></li> <li><p>If you used --global, your configuration will have been written to global ~/.gitconfig fi...
119, 606, 1231
command-line, diff, git
<h1>Git diff tool reset to git default</h1> <p>I accidentally changed my git diff tool and it was not actually installed and I have no permissions over the machine. How can I revert to the original tool that shows changes in command line? It may sound silly but I have not been able to make a single diff and I have foun...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
23,094
git
# Git diff tool reset to git default I accidentally changed my git diff tool and it was not actually installed and I have no permissions over the machine. How can I revert to the original tool that shows changes in command line? It may sound silly but I have not been able to make a single diff and I have found no info...
This depends on how you changed your git diff tool config when run `git config`. - If you used --system, your configuration will have been written to system-wide $(prefix)/etc/gitconfig - If you used --global, your configuration will have been written to global ~/.gitconfig file - The default is to assume the config f...
28080790
AOSP repo sync error, bad object HEAD
9
2015-01-22 03:27:05
<p>I have worked with and successfully compiled and installed AOSP about a year or two ago. I'm trying to get back up and running in it to do some development. However, I keep getting this error:</p> <pre><code> Fetching projects: 100% (486/486), done. Traceback (most recent call last): File "/home/hoshi/WORKIN...
10,181
2,188,781
2023-10-19 09:46:25
38,922,324
12
2016-08-12 16:09:39
949,224
2016-08-12 16:27:59
https://stackoverflow.com/q/28080790
https://stackoverflow.com/a/38922324
<p>I know the question was posted over a year ago but this answer will hopefully help others. Plus it's frustrating when this happens as the fetching can take many minutes before you know the error still exists or is finally resolved. </p> <p>The solution is to purge the .git folders for the associated project named i...
<p>I know the question was posted over a year ago but this answer will hopefully help others. Plus it's frustrating when this happens as the fetching can take many minutes before you know the error still exists or is finally resolved. </p> <p>The solution is to purge the .git folders for the associated project named i...
119, 1386, 1652, 47738, 107880
android, android-source, git, repo, synchronization
<h1>AOSP repo sync error, bad object HEAD</h1> <p>I have worked with and successfully compiled and installed AOSP about a year or two ago. I'm trying to get back up and running in it to do some development. However, I keep getting this error:</p> <pre><code> Fetching projects: 100% (486/486), done. Traceback (mos...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
23,095
git
# AOSP repo sync error, bad object HEAD I have worked with and successfully compiled and installed AOSP about a year or two ago. I'm trying to get back up and running in it to do some development. However, I keep getting this error: ``` Fetching projects: 100% (486/486), done. Traceback (most recent call last):...
I know the question was posted over a year ago but this answer will hopefully help others. Plus it's frustrating when this happens as the fetching can take many minutes before you know the error still exists or is finally resolved. The solution is to purge the .git folders for the associated project named in the error...
34541072
Git: get commits between two commits on a specific branch
9
2015-12-31 04:36:52
<p>I've read a number of answers for similar scenarios, but not this precise one. </p> <p>I need to generate a list of commits that occurred between two commits on a specific branch on git. So any commits made to other branches should be ignored. Any idea how to do this?</p>
10,970
1,217,608
2015-12-31 07:12:41
34,542,654
12
2015-12-31 07:12:41
1,256,452
2015-12-31 07:12:41
https://stackoverflow.com/q/34541072
https://stackoverflow.com/a/34542654
<p>The notion of "between" is a little fuzzy here, and the term "branch" is not well defined either (in general with git, that is). Let me see if I can keep this short despite these issues (tough for me :-) ):</p> <p>I'm going to assume that by "between", you mean the graph-theoretic notion of a <em>path</em> within ...
<p>The notion of "between" is a little fuzzy here, and the term "branch" is not well defined either (in general with git, that is). Let me see if I can keep this short despite these issues (tough for me :-) ):</p> <p>I'm going to assume that by "between", you mean the graph-theoretic notion of a <em>path</em> within ...
119
git
<h1>Git: get commits between two commits on a specific branch</h1> <p>I've read a number of answers for similar scenarios, but not this precise one. </p> <p>I need to generate a list of commits that occurred between two commits on a specific branch on git. So any commits made to other branches should be ignored. Any i...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
23,096
git
# Git: get commits between two commits on a specific branch I've read a number of answers for similar scenarios, but not this precise one. I need to generate a list of commits that occurred between two commits on a specific branch on git. So any commits made to other branches should be ignored. Any idea how to do thi...
The notion of "between" is a little fuzzy here, and the term "branch" is not well defined either (in general with git, that is). Let me see if I can keep this short despite these issues (tough for me :-) ): I'm going to assume that by "between", you mean the graph-theoretic notion of a *path* within the git commit gra...
31519071
I want to reset my current Git branch to master branch
9
2015-07-20 14:26:19
<p>I have develop &amp; master branches, my develop branch is messy now and I would like to reset it and make it as a copy of my master. I'm not sure if merging the master into develop will make both of them identical. after trying to merge I got many conflicts I solved them using:</p> <pre><code>git merge origin/mast...
15,236
2,613,848
2022-08-10 16:27:31
31,525,922
12
2015-07-20 20:39:48
4,763,421
2015-07-20 20:39:48
https://stackoverflow.com/q/31519071
https://stackoverflow.com/a/31525922
<p>Literally you have the answer to your question in the own question:</p> <pre><code>git checkout dev git reset --hard master </code></pre> <p>git reset allows three possibilities:</p> <ul> <li>soft: Move the branch to the point you decide, but it does not touch your index area and working directory.</li> <li>mixed...
<p>Literally you have the answer to your question in the own question:</p> <pre><code>git checkout dev git reset --hard master </code></pre> <p>git reset allows three possibilities:</p> <ul> <li>soft: Move the branch to the point you decide, but it does not touch your index area and working directory.</li> <li>mixed...
119, 7330
git, repository
<h1>I want to reset my current Git branch to master branch</h1> <p>I have develop &amp; master branches, my develop branch is messy now and I would like to reset it and make it as a copy of my master. I'm not sure if merging the master into develop will make both of them identical. after trying to merge I got many conf...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
23,098
git
# I want to reset my current Git branch to master branch I have develop & master branches, my develop branch is messy now and I would like to reset it and make it as a copy of my master. I'm not sure if merging the master into develop will make both of them identical. after trying to merge I got many conflicts I solve...
Literally you have the answer to your question in the own question: ``` git checkout dev git reset --hard master ``` git reset allows three possibilities: - soft: Move the branch to the point you decide, but it does not touch your index area and working directory. - mixed: (by default) the same as soft plus changes ...
29723097
mean.io push to git repo
9
2015-04-18 21:31:08
<p>I created a project on mean stack (mean.io) using </p> <pre><code>mean init </code></pre> <p>This created a git repo which I want to push into my own private git repo on Bitbucket. I did:</p> <pre><code>git remote add origin git@bitbucket.org:my_login/reponame.git git push -u origin --all </code></pre> <p>I'm ge...
599
1,930,789
2015-04-19 11:19:10
29,729,154
12
2015-04-19 11:19:10
1,307,718
2015-04-19 11:19:10
https://stackoverflow.com/q/29723097
https://stackoverflow.com/a/29729154
<pre><code>git fetch --unshallow upstream </code></pre> <p>Then</p> <pre><code>git push -u origin --all </code></pre>
<pre><code>git fetch --unshallow upstream </code></pre> <p>Then</p> <pre><code>git push -u origin --all </code></pre>
119, 8337, 97002
bitbucket, git, mean-stack
<h1>mean.io push to git repo</h1> <p>I created a project on mean stack (mean.io) using </p> <pre><code>mean init </code></pre> <p>This created a git repo which I want to push into my own private git repo on Bitbucket. I did:</p> <pre><code>git remote add origin git@bitbucket.org:my_login/reponame.git git push -u ori...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
23,099
git
# mean.io push to git repo I created a project on mean stack (mean.io) using ``` mean init ``` This created a git repo which I want to push into my own private git repo on Bitbucket. I did: ``` git remote add origin git@bitbucket.org:my_login/reponame.git git push -u origin --all ``` I'm getting the following erro...
``` git fetch --unshallow upstream ``` Then ``` git push -u origin --all ```
28891595
git format-patch X..Y for a specific author
9
2015-03-06 02:48:04
<p>I was wondering if you can generate patches for a range but only limit to commits from a specific author, the way you do with <code>git log --author='bob'</code>.</p>
3,559
3,102,766
2022-10-27 18:52:50
28,893,599
12
2015-03-06 06:47:04
654,369
2015-03-06 06:52:38
https://stackoverflow.com/q/28891595
https://stackoverflow.com/a/28893599
<p>Yes, it is possible.</p> <p>According to <a href="https://www.kernel.org/pub/software/scm/git/docs/git-format-patch.html" rel="noreferrer">reference</a> on <code>git format-patch</code> it accepts <code>&lt;revision range&gt;</code></p> <blockquote> <p>Generic expression (see "SPECIFYING REVISIONS" section in...
<p>Yes, it is possible.</p> <p>According to <a href="https://www.kernel.org/pub/software/scm/git/docs/git-format-patch.html" rel="noreferrer">reference</a> on <code>git format-patch</code> it accepts <code>&lt;revision range&gt;</code></p> <blockquote> <p>Generic expression (see "SPECIFYING REVISIONS" section in...
119, 2132
git, patch
<h1>git format-patch X..Y for a specific author</h1> <p>I was wondering if you can generate patches for a range but only limit to commits from a specific author, the way you do with <code>git log --author='bob'</code>.</p>
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
23,100
git
# git format-patch X..Y for a specific author I was wondering if you can generate patches for a range but only limit to commits from a specific author, the way you do with `git log --author='bob'`.
Yes, it is possible. According to [reference](https://www.kernel.org/pub/software/scm/git/docs/git-format-patch.html) on `git format-patch` it accepts `<revision range>` > Generic expression (see "SPECIFYING REVISIONS" > section in gitrevisions(7)) means the commits in the specified range. Details may be found in th...
27504947
Check if a GPS location is within a certain radius of another GPS location in android
9
2014-12-16 12:42:53
<p>I'm developing an Android app which takes the user's current location and shows other users' gps locations on a map which falls with a certain radius, say 20 kilometers.</p> <p>For example, if I am the user, I want to see other users' locations plotted on a map who are within a radius of 20 kilometers from my locat...
13,517
3,117,923
2019-12-05 06:21:03
27,505,069
12
2014-12-16 12:49:44
1,114,338
2014-12-16 13:04:59
https://stackoverflow.com/q/27504947
https://stackoverflow.com/a/27505069
<p>It's very easy. When you add Marker into your Map just get distance from that Marker to your Current Location if distance is &lt;= 20 then add that marker into Map. Like so</p> <pre><code>float[] results = new float[1]; Location.distanceBetween(oldPosition.latitude, oldPosition.longitude, newPosition.la...
<p>It's very easy. When you add Marker into your Map just get distance from that Marker to your Current Location if distance is &lt;= 20 then add that marker into Map. Like so</p> <pre><code>float[] results = new float[1]; Location.distanceBetween(oldPosition.latitude, oldPosition.longitude, newPosition.la...
1372, 1386, 1819, 20301
android, google-maps, gps, latitude-longitude
<h1>Check if a GPS location is within a certain radius of another GPS location in android</h1> <p>I'm developing an Android app which takes the user's current location and shows other users' gps locations on a map which falls with a certain radius, say 20 kilometers.</p> <p>For example, if I am the user, I want to see...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
23,101
git
# Check if a GPS location is within a certain radius of another GPS location in android I'm developing an Android app which takes the user's current location and shows other users' gps locations on a map which falls with a certain radius, say 20 kilometers. For example, if I am the user, I want to see other users' lo...
It's very easy. When you add Marker into your Map just get distance from that Marker to your Current Location if distance is <= 20 then add that marker into Map. Like so ``` float[] results = new float[1]; Location.distanceBetween(oldPosition.latitude, oldPosition.longitude, newPosition.latitude, newPositi...
25128077
How does git ensure that commit SHA keys for identical operations/data are still unique?
9
2014-08-04 21:43:47
<p>Q: What does git do to assure commit hashes are always unique even if they do the exact same operations with exactly the same contents. Does git simply use something like <code>uuidgen</code> to generate a unique id for the commit object or does it do something different based on a combination of a timestamp, your m...
4,482
288,703
2024-01-18 23:58:36
25,128,596
12
2014-08-04 22:32:34
1,256,452
2016-04-30 01:02:11
https://stackoverflow.com/q/25128077
https://stackoverflow.com/a/25128596
<blockquote> <p>What I would like to know though is, what exactly does git do to assure commit hashes are always unique even if they do the exact same operations with exactly the same contents.</p> </blockquote> <p>Nothing. If you create the same contents, you get the same SHA-1.</p> <p>First, however, you need to...
<blockquote> <p>What I would like to know though is, what exactly does git do to assure commit hashes are always unique even if they do the exact same operations with exactly the same contents.</p> </blockquote> <p>Nothing. If you create the same contents, you get the same SHA-1.</p> <p>First, however, you need to...
119, 946, 10188
git, sha, uuid
<h1>How does git ensure that commit SHA keys for identical operations/data are still unique?</h1> <p>Q: What does git do to assure commit hashes are always unique even if they do the exact same operations with exactly the same contents. Does git simply use something like <code>uuidgen</code> to generate a unique id for...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
23,102
git
# How does git ensure that commit SHA keys for identical operations/data are still unique? Q: What does git do to assure commit hashes are always unique even if they do the exact same operations with exactly the same contents. Does git simply use something like `uuidgen` to generate a unique id for the commit object o...
> What I would like to know though is, what exactly does git do to assure commit hashes are always unique even if they do the exact same operations with exactly the same contents. Nothing. If you create the same contents, you get the same SHA-1. First, however, you need to realize that "same contents" of a commit mea...
24498844
Using conditional configuration files with Git
9
2014-06-30 20:58:36
<p>I frequently find myself changing a single variable in my project within Git to connect to a different server while on the Development branch (in JavaScript, so I can't use preprocessor defines).</p> <p>Is there some way in Git that I can conditionally use one file or another depending on what branch I'm on? </p> ...
6,707
431,369
2017-05-30 19:58:16
24,498,888
12
2014-06-30 21:01:56
229,044
2014-06-30 21:07:29
https://stackoverflow.com/q/24498844
https://stackoverflow.com/a/24498888
<p>No, there isn't, but this is a well-solved problem.</p> <p>You have a few options:</p> <h3>Version control an example config file</h3> <ul> <li>Don't store environment-specific data in version control</li> <li>Create a <code>config.example</code> file which lists all the configuration options that need to be spec...
<p>No, there isn't, but this is a well-solved problem.</p> <p>You have a few options:</p> <h3>Version control an example config file</h3> <ul> <li>Don't store environment-specific data in version control</li> <li>Create a <code>config.example</code> file which lists all the configuration options that need to be spec...
119, 3574
config, git
<h1>Using conditional configuration files with Git</h1> <p>I frequently find myself changing a single variable in my project within Git to connect to a different server while on the Development branch (in JavaScript, so I can't use preprocessor defines).</p> <p>Is there some way in Git that I can conditionally use one...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
23,103
git
# Using conditional configuration files with Git I frequently find myself changing a single variable in my project within Git to connect to a different server while on the Development branch (in JavaScript, so I can't use preprocessor defines). Is there some way in Git that I can conditionally use one file or another...
No, there isn't, but this is a well-solved problem. You have a few options: ### Version control an example config file - Don't store environment-specific data in version control - Create a `config.example` file which lists all the configuration options that need to be specified, and provides sane defaults for develo...
22080952
git- Creating a branch which will be pushed to a remote later
9
2014-02-27 21:34:41
<p>I have a script which automatically creates a new branch with a name based on external information (JIRA ticket). I don't want to create the remote branch until I've committed and pushed some code, but I don't want to have to do "git push --set-upstream origin"</p> <p>In other words, I want to set the upstream befo...
3,041
3,362,420
2015-09-25 15:48:40
22,081,379
12
2014-02-27 21:57:27
893
2014-02-27 21:57:27
https://stackoverflow.com/q/22080952
https://stackoverflow.com/a/22081379
<p>You can do this using the following commands:</p> <pre><code>git config branch.mybranch.remote origin git config branch.mybranch.merge refs/heads/mybranch </code></pre> <p>This essentially configures the same thing as <code>--set-upstream-to</code> without checking that the upstream branch already exists first. </...
<p>You can do this using the following commands:</p> <pre><code>git config branch.mybranch.remote origin git config branch.mybranch.merge refs/heads/mybranch </code></pre> <p>This essentially configures the same thing as <code>--set-upstream-to</code> without checking that the upstream branch already exists first. </...
119
git
<h1>git- Creating a branch which will be pushed to a remote later</h1> <p>I have a script which automatically creates a new branch with a name based on external information (JIRA ticket). I don't want to create the remote branch until I've committed and pushed some code, but I don't want to have to do "git push --set-u...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
23,104
git
# git- Creating a branch which will be pushed to a remote later I have a script which automatically creates a new branch with a name based on external information (JIRA ticket). I don't want to create the remote branch until I've committed and pushed some code, but I don't want to have to do "git push --set-upstream o...
You can do this using the following commands: ``` git config branch.mybranch.remote origin git config branch.mybranch.merge refs/heads/mybranch ``` This essentially configures the same thing as `--set-upstream-to` without checking that the upstream branch already exists first. The next step is to change the `push.de...
19511044
git svn rebase index file open failed : Invalid argument
9
2013-10-22 06:54:41
<p>I use git-svn on windows for the first time , <code>git svn rebase</code> show error: </p> <p><code>fatal: index file open failed: Invalid argument</code> </p> <p>Why it happened and how can i fix it ? </p> <p>Thanks.</p>
1,815
2,905,898
2014-01-09 07:29:49
19,511,402
12
2013-10-22 07:14:16
6,309
2014-01-09 07:29:49
https://stackoverflow.com/q/19511044
https://stackoverflow.com/a/19511402
<p>If you are using msysgit on windows, there is a <a href="http://git.661346.n2.nabble.com/Regression-in-e02ca72-git-svn-rebase-is-broken-on-Windows-td7595959.html" rel="noreferrer">regression on msysgit1.8.4 for <code>git-svn</code></a>.<br /> It seems to appear when executed in a CMD, not in a bash shell, so you can...
<p>If you are using msysgit on windows, there is a <a href="http://git.661346.n2.nabble.com/Regression-in-e02ca72-git-svn-rebase-is-broken-on-Windows-td7595959.html" rel="noreferrer">regression on msysgit1.8.4 for <code>git-svn</code></a>.<br /> It seems to appear when executed in a CMD, not in a bash shell, so you can...
119, 6452
git, git-svn
<h1>git svn rebase index file open failed : Invalid argument</h1> <p>I use git-svn on windows for the first time , <code>git svn rebase</code> show error: </p> <p><code>fatal: index file open failed: Invalid argument</code> </p> <p>Why it happened and how can i fix it ? </p> <p>Thanks.</p>
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
23,106
git
# git svn rebase index file open failed : Invalid argument I use git-svn on windows for the first time , `git svn rebase` show error: `fatal: index file open failed: Invalid argument` Why it happened and how can i fix it ? Thanks.
If you are using msysgit on windows, there is a [regression on msysgit1.8.4 for `git-svn`](http://git.661346.n2.nabble.com/Regression-in-e02ca72-git-svn-rebase-is-broken-on-Windows-td7595959.html). It seems to appear when executed in a CMD, not in a bash shell, so you can try that same command in a shell. Or you can...
16372784
What is the tree hash of a specific commit hash?
9
2013-05-04 09:33:40
<p>I need a shell command-line which puts the tree hash corresponding to a specific commit hash. I know that <code>git cat-file commit $COMMITID | grep ^tree</code> can do it, but I have to filter the output of that. Is there any command which prints only the hash?</p>
1,813
97,248
2021-11-15 06:06:21
16,372,919
12
2013-05-04 09:48:47
46,194
2013-05-04 12:55:23
https://stackoverflow.com/q/16372784
https://stackoverflow.com/a/16372919
<pre><code>git log -1 --pretty="%T" $COMMITID </code></pre>
<pre><code>git log -1 --pretty="%T" $COMMITID </code></pre>
119
git
<h1>What is the tree hash of a specific commit hash?</h1> <p>I need a shell command-line which puts the tree hash corresponding to a specific commit hash. I know that <code>git cat-file commit $COMMITID | grep ^tree</code> can do it, but I have to filter the output of that. Is there any command which prints only the ha...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
23,108
git
# What is the tree hash of a specific commit hash? I need a shell command-line which puts the tree hash corresponding to a specific commit hash. I know that `git cat-file commit $COMMITID | grep ^tree` can do it, but I have to filter the output of that. Is there any command which prints only the hash?
``` git log -1 --pretty="%T" $COMMITID ```
14446738
Import part of a SVN repository into an existing Git repo
9
2013-01-21 20:32:46
<p>I have an existing SVN repo and I would like to import a part of it, with history into an existing Git repo. Could anyone give me a high-level overview of the commands needed to do this?</p> <p>Summary:</p> <ul> <li>I want to move some subdirectories in an existing SVN repository (but not the rest of the repo)</li...
4,006
586,086
2013-01-21 23:15:16
14,448,309
12
2013-01-21 22:23:37
586,086
2013-01-21 23:15:16
https://stackoverflow.com/q/14446738
https://stackoverflow.com/a/14448309
<p>It turns out to be pretty complicated, but here's what I did.</p> <ol> <li><p>Prepare the SVN repository first. I was going to delete the files from SVN afterward, so it helped to put all the files in one directory (this also makes <code>filter-branch</code> easier later.)</p></li> <li><p>Checked out the SVN repo u...
<p>It turns out to be pretty complicated, but here's what I did.</p> <ol> <li><p>Prepare the SVN repository first. I was going to delete the files from SVN afterward, so it helped to put all the files in one directory (this also makes <code>filter-branch</code> easier later.)</p></li> <li><p>Checked out the SVN repo u...
63, 119, 456, 6452, 85754
git, git-svn, svn, svn2git, version-control
<h1>Import part of a SVN repository into an existing Git repo</h1> <p>I have an existing SVN repo and I would like to import a part of it, with history into an existing Git repo. Could anyone give me a high-level overview of the commands needed to do this?</p> <p>Summary:</p> <ul> <li>I want to move some subdirectori...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
23,111
git
# Import part of a SVN repository into an existing Git repo I have an existing SVN repo and I would like to import a part of it, with history into an existing Git repo. Could anyone give me a high-level overview of the commands needed to do this? Summary: - I want to move some subdirectories in an existing SVN repos...
It turns out to be pretty complicated, but here's what I did. 1. Prepare the SVN repository first. I was going to delete the files from SVN afterward, so it helped to put all the files in one directory (this also makes `filter-branch` easier later.) 2. Checked out the SVN repo using git: `git svn clone http://path/to/...
11802967
git clone into a branch
9
2012-08-03 20:39:11
<p>Is it possible to clone a project into a new branch ? I have already cloned the main repo and would like to clone another repo that is a fork of it into a branch. I want to be able to keep comparing the differences using git diff. How can this be done ?</p>
2,838
1,566,991
2012-08-03 20:41:23
11,802,992
12
2012-08-03 20:41:23
112,968
2012-08-03 20:41:23
https://stackoverflow.com/q/11802967
https://stackoverflow.com/a/11802992
<p>You can specify a new remote and then call git fetch:</p> <pre><code>git remote add fork git://example.com/repo.git git fetch fork </code></pre> <p>You can then compare branches with</p> <pre><code>git diff origin/master fork/master </code></pre>
<p>You can specify a new remote and then call git fetch:</p> <pre><code>git remote add fork git://example.com/repo.git git fetch fork </code></pre> <p>You can then compare branches with</p> <pre><code>git diff origin/master fork/master </code></pre>
119
git
<h1>git clone into a branch</h1> <p>Is it possible to clone a project into a new branch ? I have already cloned the main repo and would like to clone another repo that is a fork of it into a branch. I want to be able to keep comparing the differences using git diff. How can this be done ?</p>
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
23,112
git
# git clone into a branch Is it possible to clone a project into a new branch ? I have already cloned the main repo and would like to clone another repo that is a fork of it into a branch. I want to be able to keep comparing the differences using git diff. How can this be done ?
You can specify a new remote and then call git fetch: ``` git remote add fork git://example.com/repo.git git fetch fork ``` You can then compare branches with ``` git diff origin/master fork/master ```
10886001
Git and log order
9
2012-06-04 18:09:09
<p>I was trying to create a linear order from "git log" output, but all my attempts failed. What I need to do is map a commit to the next release that contains that commit. I cannot run</p> <pre><code>git tag --contains &lt;commit&gt; </code></pre> <p>for each commit, as our repository contains an extremely large amo...
7,337
918,735
2015-03-10 08:59:15
11,212,541
12
2012-06-26 17:12:04
1,084,945
2014-06-28 03:06:43
https://stackoverflow.com/q/10886001
https://stackoverflow.com/a/11212541
<h3>#1: How does git store commit times, when commits are pushed into the main repository? Does it store the current machine time for each commit, in UTC?</h3> <p>From <a href="https://www.kernel.org/pub/software/scm/git/docs/git-commit.html#_date_formats" rel="nofollow noreferrer"><code>man git-commit</code></a>: </p...
<h3>#1: How does git store commit times, when commits are pushed into the main repository? Does it store the current machine time for each commit, in UTC?</h3> <p>From <a href="https://www.kernel.org/pub/software/scm/git/docs/git-commit.html#_date_formats" rel="nofollow noreferrer"><code>man git-commit</code></a>: </p...
119
git
<h1>Git and log order</h1> <p>I was trying to create a linear order from "git log" output, but all my attempts failed. What I need to do is map a commit to the next release that contains that commit. I cannot run</p> <pre><code>git tag --contains &lt;commit&gt; </code></pre> <p>for each commit, as our repository cont...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
23,114
git
# Git and log order I was trying to create a linear order from "git log" output, but all my attempts failed. What I need to do is map a commit to the next release that contains that commit. I cannot run ``` git tag --contains <commit> ``` for each commit, as our repository contains an extremely large amount of commi...
### #1: How does git store commit times, when commits are pushed into the main repository? Does it store the current machine time for each commit, in UTC? From [`man git-commit`](https://www.kernel.org/pub/software/scm/git/docs/git-commit.html#_date_formats): > Git internal format > It is [unix timestamp] [timezone...
9315024
git list changed files in several commits
9
2012-02-16 16:26:12
<p>I want to get all files that are changed in commits that matched some conditions. So I have following: <code>git log --grep=123</code>, and I need to get files that are changed in that commits as an aggregated list, e.g. if file is changed in several commits it should be included only once in the resulting list. Tha...
5,712
471,149
2018-01-29 09:36:22
9,315,138
12
2012-02-16 16:33:07
112,968
2012-02-16 16:33:07
https://stackoverflow.com/q/9315024
https://stackoverflow.com/a/9315138
<p><code>git log</code> shouldn't be used for scripting, but here's a quick solution:</p> <pre><code>git log --grep=pattern --name-only --pretty=format:'' | sort -u </code></pre>
<p><code>git log</code> shouldn't be used for scripting, but here's a quick solution:</p> <pre><code>git log --grep=pattern --name-only --pretty=format:'' | sort -u </code></pre>
119
git
<h1>git list changed files in several commits</h1> <p>I want to get all files that are changed in commits that matched some conditions. So I have following: <code>git log --grep=123</code>, and I need to get files that are changed in that commits as an aggregated list, e.g. if file is changed in several commits it shou...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
23,115
git
# git list changed files in several commits I want to get all files that are changed in commits that matched some conditions. So I have following: `git log --grep=123`, and I need to get files that are changed in that commits as an aggregated list, e.g. if file is changed in several commits it should be included only ...
`git log` shouldn't be used for scripting, but here's a quick solution: ``` git log --grep=pattern --name-only --pretty=format:'' | sort -u ```
9144638
With git, how can I perform a git add and still have it ignore the patterns in .gitignore?
9
2012-02-04 21:19:11
<p>I want to do something like <code>git add *.java</code> and not let it throw up just because one of those files matched the .gitignore.</p> <p>For example: In my directory I have</p> <pre><code>ignored.java something.java somethingelse.java somethingevenmoreelse.java. </code></pre> <p>where the three last files ...
313
334,862
2014-02-10 01:43:39
9,145,145
12
2012-02-04 22:25:30
19,563
2012-02-04 22:25:30
https://stackoverflow.com/q/9144638
https://stackoverflow.com/a/9145145
<p>If you quote the glob pattern then it will interpreted by git instead of the shell and it will ignore the ignored files before adding the rest without error.</p> <pre><code>git add '*.java' </code></pre> <p>alternatively:</p> <pre><code>git add \*.java </code></pre>
<p>If you quote the glob pattern then it will interpreted by git instead of the shell and it will ignore the ignored files before adding the rest without error.</p> <pre><code>git add '*.java' </code></pre> <p>alternatively:</p> <pre><code>git add \*.java </code></pre>
119
git
<h1>With git, how can I perform a git add and still have it ignore the patterns in .gitignore?</h1> <p>I want to do something like <code>git add *.java</code> and not let it throw up just because one of those files matched the .gitignore.</p> <p>For example: In my directory I have</p> <pre><code>ignored.java somethin...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
23,116
git
# With git, how can I perform a git add and still have it ignore the patterns in .gitignore? I want to do something like `git add *.java` and not let it throw up just because one of those files matched the .gitignore. For example: In my directory I have ``` ignored.java something.java somethingelse.java somethingev...
If you quote the glob pattern then it will interpreted by git instead of the shell and it will ignore the ignored files before adding the rest without error. ``` git add '*.java' ``` alternatively: ``` git add \*.java ```
8290421
What's the *right* way to apply a patch from another branch?
9
2011-11-28 00:56:16
<p>I make a fix in one branch and want to apply it to another branch. Here's what I have been doing:</p> <pre><code>git diff 68610d^ 68610d | git apply git commit -a -m "SV-656 IP blocking not working (applying patch from 68610d)" </code></pre> <p>works perfectly but it occurs to me, it doesn't seem like a very gi...
5,787
238,884
2011-11-28 01:18:36
8,290,547
12
2011-11-28 01:18:36
85,371
2011-11-28 01:18:36
https://stackoverflow.com/q/8290421
https://stackoverflow.com/a/8290547
<p>The correct way would be</p> <pre><code>git cherry-pick 68610d </code></pre> <p>If your really wanted to alter the commit message:</p> <pre><code>git cherry-pick --no-commit 68610d git commit -m "SV-656 IP blocking not working (applying patch from 68610d)" </code></pre>
<p>The correct way would be</p> <pre><code>git cherry-pick 68610d </code></pre> <p>If your really wanted to alter the commit message:</p> <pre><code>git cherry-pick --no-commit 68610d git commit -m "SV-656 IP blocking not working (applying patch from 68610d)" </code></pre>
119
git
<h1>What's the *right* way to apply a patch from another branch?</h1> <p>I make a fix in one branch and want to apply it to another branch. Here's what I have been doing:</p> <pre><code>git diff 68610d^ 68610d | git apply git commit -a -m "SV-656 IP blocking not working (applying patch from 68610d)" </code></pre> ...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
23,117
git
# What's the *right* way to apply a patch from another branch? I make a fix in one branch and want to apply it to another branch. Here's what I have been doing: ``` git diff 68610d^ 68610d | git apply git commit -a -m "SV-656 IP blocking not working (applying patch from 68610d)" ``` works perfectly but it occurs t...
The correct way would be ``` git cherry-pick 68610d ``` If your really wanted to alter the commit message: ``` git cherry-pick --no-commit 68610d git commit -m "SV-656 IP blocking not working (applying patch from 68610d)" ```
7285578
Setting remote to use specified port for ssh
9
2011-09-02 15:16:12
<p>I have ssh keys setup to work on a specified port (e.g. 12345) and issued the following git command to set the origin on a local repo.</p> <pre><code>git remote add origin myusername@mydomain.com:12345/path/to/public_html/files/ </code></pre> <p>I am getting the following error message when i try to push to origin...
5,652
488,856
2013-04-02 20:32:18
7,285,644
12
2011-09-02 15:22:25
839,646
2011-09-02 15:22:25
https://stackoverflow.com/q/7285578
https://stackoverflow.com/a/7285644
<p>To specify a custom port, you have to add the ssh:// prefix. Otherwise, git interprets your 12345 as part of the project's path. See <a href="http://www.kernel.org/pub/software/scm/git/docs/git-pull.html#URLS" rel="noreferrer">URLs in the git-pull docs</a>. So:</p> <pre><code>git remote add origin ssh://myusername@...
<p>To specify a custom port, you have to add the ssh:// prefix. Otherwise, git interprets your 12345 as part of the project's path. See <a href="http://www.kernel.org/pub/software/scm/git/docs/git-pull.html#URLS" rel="noreferrer">URLs in the git-pull docs</a>. So:</p> <pre><code>git remote add origin ssh://myusername@...
119
git
<h1>Setting remote to use specified port for ssh</h1> <p>I have ssh keys setup to work on a specified port (e.g. 12345) and issued the following git command to set the origin on a local repo.</p> <pre><code>git remote add origin myusername@mydomain.com:12345/path/to/public_html/files/ </code></pre> <p>I am getting th...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
23,118
git
# Setting remote to use specified port for ssh I have ssh keys setup to work on a specified port (e.g. 12345) and issued the following git command to set the origin on a local repo. ``` git remote add origin myusername@mydomain.com:12345/path/to/public_html/files/ ``` I am getting the following error message when i ...
To specify a custom port, you have to add the ssh:// prefix. Otherwise, git interprets your 12345 as part of the project's path. See [URLs in the git-pull docs](http://www.kernel.org/pub/software/scm/git/docs/git-pull.html#URLS). So: ``` git remote add origin ssh://myusername@mydomain.com:12345/path/to/public_html/fil...
6564309
git ls-remote returns 128 on any repo
9
2011-07-03 17:15:57
<p>When using git, <code>git ls-remote</code> returns status code <code>128</code> while any other commands work flawlessly (push/pull/clone/etc). My repos are being managed with gitolite. I'm getting this error when trying to deploy rails app for the first time. When invoking said command by hand I get standard error ...
19,390
41,761
2022-10-04 18:23:36
6,564,383
12
2011-07-03 17:27:26
41,761
2011-07-03 17:27:26
https://stackoverflow.com/q/6564309
https://stackoverflow.com/a/6564383
<p>I figured it out. The problem was in repo's address. I have used <code>git://host/repo</code> address instead of <code>git@host:repo</code>. The latter fixed the issue.</p>
<p>I figured it out. The problem was in repo's address. I have used <code>git://host/repo</code> address instead of <code>git@host:repo</code>. The latter fixed the issue.</p>
119, 39151
git, gitolite
<h1>git ls-remote returns 128 on any repo</h1> <p>When using git, <code>git ls-remote</code> returns status code <code>128</code> while any other commands work flawlessly (push/pull/clone/etc). My repos are being managed with gitolite. I'm getting this error when trying to deploy rails app for the first time. When invo...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
23,119
git
# git ls-remote returns 128 on any repo When using git, `git ls-remote` returns status code `128` while any other commands work flawlessly (push/pull/clone/etc). My repos are being managed with gitolite. I'm getting this error when trying to deploy rails app for the first time. When invoking said command by hand I get...
I figured it out. The problem was in repo's address. I have used `git://host/repo` address instead of `git@host:repo`. The latter fixed the issue.
6514611
Getting complete history of an SVN repo that's been renamed using git-svn
9
2011-06-29 00:39:20
<p>I have an SVN repository which was renamed from "Project" to "Project v1".</p> <p>I then did a <code>git svn clone</code> to create a git version of the renamed SVN folder.</p> <p>When I <code>git log</code> the newly created git repository, I only see a single history item. It's the commit message which I gave th...
4,859
5,758
2011-11-23 22:45:17
6,517,495
12
2011-06-29 08:04:49
479,989
2011-11-23 22:45:17
https://stackoverflow.com/q/6514611
https://stackoverflow.com/a/6517495
<p>The only way I have done this in the past (not knowing it's the best or only way!) was to explicitly <code>git svn fetch</code> the prior history (you may need a second remote for this) and then graft the renamed tree onto the old history with <code>git filter-branch</code> (there's a specific example in the docs fo...
<p>The only way I have done this in the past (not knowing it's the best or only way!) was to explicitly <code>git svn fetch</code> the prior history (you may need a second remote for this) and then graft the renamed tree onto the old history with <code>git filter-branch</code> (there's a specific example in the docs fo...
119, 6452
git, git-svn
<h1>Getting complete history of an SVN repo that's been renamed using git-svn</h1> <p>I have an SVN repository which was renamed from "Project" to "Project v1".</p> <p>I then did a <code>git svn clone</code> to create a git version of the renamed SVN folder.</p> <p>When I <code>git log</code> the newly created git re...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
23,120
git
# Getting complete history of an SVN repo that's been renamed using git-svn I have an SVN repository which was renamed from "Project" to "Project v1". I then did a `git svn clone` to create a git version of the renamed SVN folder. When I `git log` the newly created git repository, I only see a single history item. I...
The only way I have done this in the past (not knowing it's the best or only way!) was to explicitly `git svn fetch` the prior history (you may need a second remote for this) and then graft the renamed tree onto the old history with `git filter-branch` (there's a specific example in the docs for reparenting a tree). #...
4975928
How to keep the GIT repos in sync
9
2011-02-12 02:27:58
<p>I don’t grasp GIT yet. So I have a basic question:</p> <p>I want to keep one of the repos that I am using (I don’t own it, I cloned it) in sync with my local copy.</p> <p>How do I do that?</p> <p>I am aware of git fetch/pull but when I do run that in the same folder where I executed git clone <a href="http://.......
20,040
149,157
2011-02-12 23:52:55
4,979,773
12
2011-02-12 18:22:09
97,101
2011-02-12 18:22:09
https://stackoverflow.com/q/4975928
https://stackoverflow.com/a/4979773
<p><code>git fetch</code> will retrieve all changes from the remote.</p> <p><code>git pull</code> will merge those changes from the remote into your local copy (this accomplishes two commands in one step. <code>fetch &amp; merge</code></p> <p>If you have commit access to the remote repository, <code>git push</code> w...
<p><code>git fetch</code> will retrieve all changes from the remote.</p> <p><code>git pull</code> will merge those changes from the remote into your local copy (this accomplishes two commands in one step. <code>fetch &amp; merge</code></p> <p>If you have commit access to the remote repository, <code>git push</code> w...
119
git
<h1>How to keep the GIT repos in sync</h1> <p>I don’t grasp GIT yet. So I have a basic question:</p> <p>I want to keep one of the repos that I am using (I don’t own it, I cloned it) in sync with my local copy.</p> <p>How do I do that?</p> <p>I am aware of git fetch/pull but when I do run that in the same folder wher...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
23,122
git
# How to keep the GIT repos in sync I don’t grasp GIT yet. So I have a basic question: I want to keep one of the repos that I am using (I don’t own it, I cloned it) in sync with my local copy. How do I do that? I am aware of git fetch/pull but when I do run that in the same folder where I executed git clone <http:/...
`git fetch` will retrieve all changes from the remote. `git pull` will merge those changes from the remote into your local copy (this accomplishes two commands in one step. `fetch & merge` If you have commit access to the remote repository, `git push` will push your local changes to the origin that you cloned from.
2113305
Git big commit best practices
9
2010-01-21 22:05:03
<p>I'm using git and been working heavily on my local repository the last week.</p> <p>I like to make many small commits (like 2 o 3 files) instead of big ones, but this time between time pressure and that the change involved many files, I've got a whole lot of files unstaged.</p> <p>My question is, what is the best ...
3,467
7,595
2010-01-26 12:46:32
2,113,359
12
2010-01-21 22:12:20
219,217
2010-01-21 22:12:20
https://stackoverflow.com/q/2113305
https://stackoverflow.com/a/2113359
<p><code>git add -i</code> should help you divide commits to chunks, then <code>git stash</code> rest of code, check if everything works, <code>git commit</code>, <code>git stash pop</code> and loop.</p>
<p><code>git add -i</code> should help you divide commits to chunks, then <code>git stash</code> rest of code, check if everything works, <code>git commit</code>, <code>git stash pop</code> and loop.</p>
119
git
<h1>Git big commit best practices</h1> <p>I'm using git and been working heavily on my local repository the last week.</p> <p>I like to make many small commits (like 2 o 3 files) instead of big ones, but this time between time pressure and that the change involved many files, I've got a whole lot of files unstaged.</p...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
23,123
git
# Git big commit best practices I'm using git and been working heavily on my local repository the last week. I like to make many small commits (like 2 o 3 files) instead of big ones, but this time between time pressure and that the change involved many files, I've got a whole lot of files unstaged. My question is, w...
`git add -i` should help you divide commits to chunks, then `git stash` rest of code, check if everything works, `git commit`, `git stash pop` and loop.
1869530
How do I force git to think a file is unmerged?
9
2009-12-08 20:11:23
<p>I want to make changes to a file in my repo, then force git to believe the file is unmerged and show up in <code>git status</code> like so:</p> <pre><code># Unmerged paths: # (use "git reset HEAD &lt;file&gt;..." to unstage) # (use "git add &lt;file&gt;..." to mark resolution) # # both modified: lib/...
5,612
202,201
2017-07-17 00:19:25
1,869,991
12
2009-12-08 21:33:31
46,058
2009-12-13 17:53:52
https://stackoverflow.com/q/1869530
https://stackoverflow.com/a/1869991
<p>In Git file that has a merge conflicts has (usually) three versions in index, and a version in working area with <code>diff3 -E</code> / <code>rcsmerge</code> conflict markers. The versions in the index are stage 1 from common ancestor, stage 2 for "our" version, and stage 3 for "theirs" version. For unmerged file...
<p>In Git file that has a merge conflicts has (usually) three versions in index, and a version in working area with <code>diff3 -E</code> / <code>rcsmerge</code> conflict markers. The versions in the index are stage 1 from common ancestor, stage 2 for "our" version, and stage 3 for "theirs" version. For unmerged file...
119, 127522
git, ruby-piston
<h1>How do I force git to think a file is unmerged?</h1> <p>I want to make changes to a file in my repo, then force git to believe the file is unmerged and show up in <code>git status</code> like so:</p> <pre><code># Unmerged paths: # (use "git reset HEAD &lt;file&gt;..." to unstage) # (use "git add &lt;file&gt;.....
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
23,124
git
# How do I force git to think a file is unmerged? I want to make changes to a file in my repo, then force git to believe the file is unmerged and show up in `git status` like so: ``` # Unmerged paths: # (use "git reset HEAD <file>..." to unstage) # (use "git add <file>..." to mark resolution) # # both modif...
In Git file that has a merge conflicts has (usually) three versions in index, and a version in working area with `diff3 -E` / `rcsmerge` conflict markers. The versions in the index are stage 1 from common ancestor, stage 2 for "our" version, and stage 3 for "theirs" version. For unmerged file there is no version in sta...
1628652
Git tags disappear when doing a push then clone?
9
2009-10-27 03:40:07
<p>We have a repository with multiple tags. Each tag represents a version of the software. We are pushing the repository to a remote server.</p> <p>When we do a fresh clone off the remote server, the tags are no longer there. How do you ensure other developers or clients can check out specific versions of software off...
998
150,172
2017-11-03 14:12:05
1,628,662
12
2009-10-27 03:43:52
69,755
2009-10-28 05:31:34
https://stackoverflow.com/q/1628652
https://stackoverflow.com/a/1628662
<p><code>git push --tags</code> or <code>git push <em>remote</em> <em>tag-name</em></code></p>
<p><code>git push --tags</code> or <code>git push <em>remote</em> <em>tag-name</em></code></p>
115, 119
git, tags
<h1>Git tags disappear when doing a push then clone?</h1> <p>We have a repository with multiple tags. Each tag represents a version of the software. We are pushing the repository to a remote server.</p> <p>When we do a fresh clone off the remote server, the tags are no longer there. How do you ensure other developers ...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
23,125
git
# Git tags disappear when doing a push then clone? We have a repository with multiple tags. Each tag represents a version of the software. We are pushing the repository to a remote server. When we do a fresh clone off the remote server, the tags are no longer there. How do you ensure other developers or clients can c...
`git push --tags` or `git push remote tag-name`
71162040
How to insert git info in environment variables using Vite?
8
2022-02-17 16:37:11
<p>How to get information from git about current branch, commit date and other when using <a href="https://vitejs.dev/" rel="noreferrer">Vite</a> bundler?</p>
5,383
8,086,153
2022-04-29 19:26:28
71,162,041
12
2022-02-17 16:37:11
8,086,153
2022-04-29 19:26:28
https://stackoverflow.com/q/71162040
https://stackoverflow.com/a/71162041
<p>It is possible to use <a href="https://nodejs.org/api/child_process.html#child_processexecsynccommand-options" rel="noreferrer">execSync</a> and retrive git information when starting Vite.<br /> <em>vite.config.ts</em>:</p> <pre><code>export default ({ mode }: ConfigEnv) =&gt; { const dev = mode === 'development'...
<p>It is possible to use <a href="https://nodejs.org/api/child_process.html#child_processexecsynccommand-options" rel="noreferrer">execSync</a> and retrive git information when starting Vite.<br /> <em>vite.config.ts</em>:</p> <pre><code>export default ({ mode }: ConfigEnv) =&gt; { const dev = mode === 'development'...
3, 119, 456, 149169
git, javascript, version-control, vite
<h1>How to insert git info in environment variables using Vite?</h1> <p>How to get information from git about current branch, commit date and other when using <a href="https://vitejs.dev/" rel="noreferrer">Vite</a> bundler?</p>
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
23,127
git
# How to insert git info in environment variables using Vite? How to get information from git about current branch, commit date and other when using [Vite](https://vitejs.dev/) bundler?
It is possible to use [execSync](https://nodejs.org/api/child_process.html#child_processexecsynccommand-options) and retrive git information when starting Vite. *vite.config.ts*: ``` export default ({ mode }: ConfigEnv) => { const dev = mode === 'development'; const commitDate = execSync('git log -1 --format=...
69409255
How to get city, state, and country from a list of latitude and longitude coordinates?
8
2021-10-01 16:32:49
<p>I have a 500,000 list of latitudes and longitudes coordinates like below:</p> <pre><code>Latitude Longitude 42.022506 -88.168156 41.877445 -87.723846 29.986801 -90.166314 </code></pre> <p>I am looking to use python to get the city, state, and country for each coordinate in a new column like below:</p> <...
25,306
13,546,570
2021-10-01 17:26:29
69,409,857
12
2021-10-01 17:26:29
530,160
2021-10-01 17:26:29
https://stackoverflow.com/q/69409255
https://stackoverflow.com/a/69409857
<p>You want to run a function on each row, which can be done using <a href="https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.apply.html" rel="noreferrer">apply()</a>.</p> <p>There are two complications, which is that you want to 1) provide multiple arguments to the function, and 2) get back multiple result...
<p>You want to run a function on each row, which can be done using <a href="https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.apply.html" rel="noreferrer">apply()</a>.</p> <p>There are two complications, which is that you want to 1) provide multiple arguments to the function, and 2) get back multiple result...
16, 20301, 67719
latitude-longitude, pandas, python
<h1>How to get city, state, and country from a list of latitude and longitude coordinates?</h1> <p>I have a 500,000 list of latitudes and longitudes coordinates like below:</p> <pre><code>Latitude Longitude 42.022506 -88.168156 41.877445 -87.723846 29.986801 -90.166314 </code></pre> <p>I am looking to use ...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
23,129
git
# How to get city, state, and country from a list of latitude and longitude coordinates? I have a 500,000 list of latitudes and longitudes coordinates like below: ``` Latitude Longitude 42.022506 -88.168156 41.877445 -87.723846 29.986801 -90.166314 ``` I am looking to use python to get the city, state, an...
You want to run a function on each row, which can be done using [apply()](https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.apply.html). There are two complications, which is that you want to 1) provide multiple arguments to the function, and 2) get back multiple results. These questions explain how to do...
67452096
`docker build` hangs based on order of install
8
2021-05-08 20:59:49
<p>Given this <code>Dockerfile</code>:</p> <pre><code>FROM ubuntu:20.04 RUN set -ex &amp;&amp; apt-get update RUN set -ex &amp;&amp; \ apt-get install -y \ git RUN set -ex &amp;&amp; \ apt-get install -y \ cmake ENV HOME_DIR /home/develop WORKDIR ${HOME_DIR} </code></pre> <p>The <code>docker build<...
4,692
229,058
2021-11-09 17:13:23
67,452,950
12
2021-05-08 23:10:21
596,285
2021-05-08 23:10:21
https://stackoverflow.com/q/67452096
https://stackoverflow.com/a/67452950
<p>Suppress prompting from apt by setting the DEBIAN_FRONTEND variable, which can be done with a build arg that only exists during the build (allowing interactive users exec'd into a container):</p> <pre><code>FROM ubuntu:20.04 ARG DEBIAN_FRONTEND=noninteractive RUN set -ex &amp;&amp; \ apt-get update &amp;&amp; \...
<p>Suppress prompting from apt by setting the DEBIAN_FRONTEND variable, which can be done with a build arg that only exists during the build (allowing interactive users exec'd into a container):</p> <pre><code>FROM ubuntu:20.04 ARG DEBIAN_FRONTEND=noninteractive RUN set -ex &amp;&amp; \ apt-get update &amp;&amp; \...
119, 549, 8822, 90304
cmake, docker, git, ubuntu
<h1>`docker build` hangs based on order of install</h1> <p>Given this <code>Dockerfile</code>:</p> <pre><code>FROM ubuntu:20.04 RUN set -ex &amp;&amp; apt-get update RUN set -ex &amp;&amp; \ apt-get install -y \ git RUN set -ex &amp;&amp; \ apt-get install -y \ cmake ENV HOME_DIR /home/develop WORK...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
23,130
git
# `docker build` hangs based on order of install Given this `Dockerfile`: ``` FROM ubuntu:20.04 RUN set -ex && apt-get update RUN set -ex && \ apt-get install -y \ git RUN set -ex && \ apt-get install -y \ cmake ENV HOME_DIR /home/develop WORKDIR ${HOME_DIR} ``` The `docker build` hangs configur...
Suppress prompting from apt by setting the DEBIAN_FRONTEND variable, which can be done with a build arg that only exists during the build (allowing interactive users exec'd into a container): ``` FROM ubuntu:20.04 ARG DEBIAN_FRONTEND=noninteractive RUN set -ex && \ apt-get update && \ apt-get install -y \ ...
55464562
Rebase a branch backwards to master branch?
8
2019-04-01 22:40:51
<p>I have a feature branch B that is made off of a feature branch A. I want to rebase branch B back onto master without branch A's commits.</p> <p>My repository looks like this:</p> <pre><code>c1---c2---c3 master \ c4---c5---c6 A \ c7---c8---c...
1,202
8,377,123
2019-04-14 16:41:55
55,464,627
12
2019-04-01 22:48:49
354,577
2019-04-01 22:48:49
https://stackoverflow.com/q/55464562
https://stackoverflow.com/a/55464627
<p>It's possible to trace back from <code>B</code> to <code>master</code>, so as far as Git is concerned branch <code>B</code> is already "on" <code>master</code>. In other words, <code>B</code> "contains" <code>master</code>.</p> <p>Try being explicit about the branch to be rebased and and the upstream:</p> <pre><co...
<p>It's possible to trace back from <code>B</code> to <code>master</code>, so as far as Git is concerned branch <code>B</code> is already "on" <code>master</code>. In other words, <code>B</code> "contains" <code>master</code>.</p> <p>Try being explicit about the branch to be rebased and and the upstream:</p> <pre><co...
119, 1879, 29934
branch, git, git-rebase
<h1>Rebase a branch backwards to master branch?</h1> <p>I have a feature branch B that is made off of a feature branch A. I want to rebase branch B back onto master without branch A's commits.</p> <p>My repository looks like this:</p> <pre><code>c1---c2---c3 master \ c4---c5---c6 A ...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
23,139
git
# Rebase a branch backwards to master branch? I have a feature branch B that is made off of a feature branch A. I want to rebase branch B back onto master without branch A's commits. My repository looks like this: ``` c1---c2---c3 master \ c4---c5---c6 A \ ...
It's possible to trace back from `B` to `master`, so as far as Git is concerned branch `B` is already "on" `master`. In other words, `B` "contains" `master`. Try being explicit about the branch to be rebased and and the upstream: ``` git rebase --onto master A B ```
50138232
How to implement digital signature with my existing web project
8
2018-05-02 15:24:06
<p>I'm working on the project where the user needs to do a digital signature on a document. I checked in the google and know about sinadura which is a desktop application but I need to invoke this into my web application. </p> <p>I installed alfresco community edition on Linux server (<a href="https://www.alfresco.com...
17,809
808,409
2018-05-11 21:11:58
50,208,561
12
2018-05-07 06:52:26
6,371,459
2018-05-07 06:52:26
https://stackoverflow.com/q/50138232
https://stackoverflow.com/a/50208561
<p>The security restrictions of browsers do not allow javascript access to the system certificate keystore or smart cards. Formerly java applets could be used, but with the latest browser updates it is no longer possible.</p> <p>Current solutions for digital signature in browsers require the installation of a desktop ...
<p>The security restrictions of browsers do not allow javascript access to the system certificate keystore or smart cards. Formerly java applets could be used, but with the latest browser updates it is no longer possible.</p> <p>Current solutions for digital signature in browsers require the installation of a desktop ...
17, 8502, 9103, 17782, 81856
alfresco, alfresco-share, digital-certificate, digital-signature, java
<h1>How to implement digital signature with my existing web project</h1> <p>I'm working on the project where the user needs to do a digital signature on a document. I checked in the google and know about sinadura which is a desktop application but I need to invoke this into my web application. </p> <p>I installed alfr...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
23,140
git
# How to implement digital signature with my existing web project I'm working on the project where the user needs to do a digital signature on a document. I checked in the google and know about sinadura which is a desktop application but I need to invoke this into my web application. I installed alfresco community ed...
The security restrictions of browsers do not allow javascript access to the system certificate keystore or smart cards. Formerly java applets could be used, but with the latest browser updates it is no longer possible. Current solutions for digital signature in browsers require the installation of a desktop software o...
49427268
Can I run sbt new with a local template (not GitHub)?
8
2018-03-22 11:16:28
<p>I work in a secure environment where developers are not allowed to git-clone from GitHub, or any other external repos.</p> <p>I was able to download a g8 template (play-scala-seed) from GitHub as a zip file and I've unzipped it to a local folder. Can I use that local directory instead of a git repo?</p> <p>My firs...
2,649
1,179,137
2018-03-24 10:04:55
49,430,811
12
2018-03-22 14:09:51
736,957
2018-03-22 14:16:59
https://stackoverflow.com/q/49427268
https://stackoverflow.com/a/49430811
<p>When you use giter8 directly you just need to refer to your local template with the <code>file://</code> prefix:</p> <pre><code>g8 file://play-scala-seed </code></pre> <p>As mentioned by @volia17, you can find it in the giter8 documentation: <a href="http://www.foundweekends.org/giter8/testing.html" rel="noreferre...
<p>When you use giter8 directly you just need to refer to your local template with the <code>file://</code> prefix:</p> <pre><code>g8 file://play-scala-seed </code></pre> <p>As mentioned by @volia17, you can find it in the giter8 documentation: <a href="http://www.foundweekends.org/giter8/testing.html" rel="noreferre...
3143, 41325, 88346
giter8, sbt, scala
<h1>Can I run sbt new with a local template (not GitHub)?</h1> <p>I work in a secure environment where developers are not allowed to git-clone from GitHub, or any other external repos.</p> <p>I was able to download a g8 template (play-scala-seed) from GitHub as a zip file and I've unzipped it to a local folder. Can I ...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
23,141
git
# Can I run sbt new with a local template (not GitHub)? I work in a secure environment where developers are not allowed to git-clone from GitHub, or any other external repos. I was able to download a g8 template (play-scala-seed) from GitHub as a zip file and I've unzipped it to a local folder. Can I use that local d...
When you use giter8 directly you just need to refer to your local template with the `file://` prefix: ``` g8 file://play-scala-seed ``` As mentioned by @volia17, you can find it in the giter8 documentation: [Testing templates locally](http://www.foundweekends.org/giter8/testing.html). But when you use `sbt new`, you...
47753551
git merge --strategy vs. --strategy-option
8
2017-12-11 12:58:58
<p>What is the difference between the git merge option <code>--strategy-option</code> (short <code>-X</code>) and <code>--strategy</code> (short <code>-s</code>)?</p> <p>There are a lot of questions regarding <a href="https://stackoverflow.com/questions/366860/when-would-you-use-the-different-git-merge-strategies">mer...
9,974
1,909,531
2017-12-11 13:26:31
47,753,893
12
2017-12-11 13:20:29
637,466
2017-12-11 13:20:29
https://stackoverflow.com/q/47753551
https://stackoverflow.com/a/47753893
<p>TL;DR: <code>-s</code> is for specifying a merge strategy <code>-X</code> is for supplying options for said strategy.</p> <p>The git documentation says:</p> <pre><code>-s &lt;strategy&gt; --strategy=&lt;strategy&gt; </code></pre> <p>Use the given merge strategy; can be supplied more than once to specify them in t...
<p>TL;DR: <code>-s</code> is for specifying a merge strategy <code>-X</code> is for supplying options for said strategy.</p> <p>The git documentation says:</p> <pre><code>-s &lt;strategy&gt; --strategy=&lt;strategy&gt; </code></pre> <p>Use the given merge strategy; can be supplied more than once to specify them in t...
119, 28897
git, git-merge
<h1>git merge --strategy vs. --strategy-option</h1> <p>What is the difference between the git merge option <code>--strategy-option</code> (short <code>-X</code>) and <code>--strategy</code> (short <code>-s</code>)?</p> <p>There are a lot of questions regarding <a href="https://stackoverflow.com/questions/366860/when-w...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
23,142
git
# git merge --strategy vs. --strategy-option What is the difference between the git merge option `--strategy-option` (short `-X`) and `--strategy` (short `-s`)? There are a lot of questions regarding [merge strategies](https://stackoverflow.com/questions/366860/when-would-you-use-the-different-git-merge-strategies). ...
TL;DR: `-s` is for specifying a merge strategy `-X` is for supplying options for said strategy. The git documentation says: ``` -s <strategy> --strategy=<strategy> ``` Use the given merge strategy; can be supplied more than once to specify them in the order they should be tried. If there is no -s option, a built-in ...
45530765
Why is a branch is present in section "local ref configured for git push" but absent in section "local branch configured for git pull"
8
2017-08-06 09:55:14
<p>I'm currently learning git by following the book "progit 2nd edi".</p> <p>In the section "inspecting a remote", the author had the following example.</p> <p><a href="https://i.sstatic.net/C5HmS.png" rel="noreferrer"><img src="https://i.sstatic.net/C5HmS.png" alt="enter image description here"></a></p> <p>I have n...
4,422
5,581,182
2017-09-19 13:12:03
45,531,248
12
2017-08-06 10:52:03
1,256,452
2017-08-06 10:52:03
https://stackoverflow.com/q/45530765
https://stackoverflow.com/a/45531248
<p>This seems to be a synthetic example, so it <em>could</em> just be a mistake. However, it could also be a side effect of a particular configuration, where local branch <code>markdown-strip</code> has no upstream set.</p> <p>Remember, the <em>upstream</em> of any branch is a two-part setting that you can set with on...
<p>This seems to be a synthetic example, so it <em>could</em> just be a mistake. However, it could also be a side effect of a particular configuration, where local branch <code>markdown-strip</code> has no upstream set.</p> <p>Remember, the <em>upstream</em> of any branch is a two-part setting that you can set with on...
119, 456, 4236, 4860
git, pull, push, version-control
<h1>Why is a branch is present in section "local ref configured for git push" but absent in section "local branch configured for git pull"</h1> <p>I'm currently learning git by following the book "progit 2nd edi".</p> <p>In the section "inspecting a remote", the author had the following example.</p> <p><a href="https...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
23,143
git
# Why is a branch is present in section "local ref configured for git push" but absent in section "local branch configured for git pull" I'm currently learning git by following the book "progit 2nd edi". In the section "inspecting a remote", the author had the following example. [![enter image description here](http...
This seems to be a synthetic example, so it *could* just be a mistake. However, it could also be a side effect of a particular configuration, where local branch `markdown-strip` has no upstream set. Remember, the *upstream* of any branch is a two-part setting that you can set with one command: ``` git branch --set-up...
44718042
Git Pull vs Git fetch Which one is Preferable?
8
2017-06-23 09:35:26
<p>I know the difference between <code>git pull</code> and <code>git fetch</code> . </p> <p>but i want to know, Which one is Preferable?</p> <p>because <code>git pull</code> doing merge automatically without my knowledge. thats the different i found. <code>git fetch</code> wont do that. is there anything else? </p>
22,276
4,453,737
2017-06-23 09:37:58
44,718,094
12
2017-06-23 09:37:51
1,863,229
2017-06-23 09:37:51
https://stackoverflow.com/q/44718042
https://stackoverflow.com/a/44718094
<p>Contrary to the above comments, <code>git pull</code> and <code>git fetch</code> are <em>not</em> completely different commands. Rather, doing a <code>git pull</code> on a given branch is the same as doing a <code>git fetch</code> followed by either merging or rebasing the current branch on its remote counterpart w...
<p>Contrary to the above comments, <code>git pull</code> and <code>git fetch</code> are <em>not</em> completely different commands. Rather, doing a <code>git pull</code> on a given branch is the same as doing a <code>git fetch</code> followed by either merging or rebasing the current branch on its remote counterpart w...
119, 28896, 33720
git, git-fetch, git-pull
<h1>Git Pull vs Git fetch Which one is Preferable?</h1> <p>I know the difference between <code>git pull</code> and <code>git fetch</code> . </p> <p>but i want to know, Which one is Preferable?</p> <p>because <code>git pull</code> doing merge automatically without my knowledge. thats the different i found. <code>git f...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
23,144
git
# Git Pull vs Git fetch Which one is Preferable? I know the difference between `git pull` and `git fetch` . but i want to know, Which one is Preferable? because `git pull` doing merge automatically without my knowledge. thats the different i found. `git fetch` wont do that. is there anything else?
Contrary to the above comments, `git pull` and `git fetch` are *not* completely different commands. Rather, doing a `git pull` on a given branch is the same as doing a `git fetch` followed by either merging or rebasing the current branch on its remote counterpart which was just updated. The utility of doing a `git pul...
39120546
Git svn fetch and then commit to remote git
8
2016-08-24 10:18:33
<p>My customer has a SVN repo and I would like to use git on my side instead. I used git-svn to create a git from my customer's svn and created a gitlab for it. If my customer changes something on his side I would like to fetch the changes and then update my gitlab to keep everything in sync.</p> <p>Currently I'm usin...
5,523
2,966,326
2016-08-24 10:53:24
39,120,907
12
2016-08-24 10:34:52
26,396
2016-08-24 10:53:24
https://stackoverflow.com/q/39120546
https://stackoverflow.com/a/39120907
<h2>tl;dr</h2> <p>If you want to keep your GitLab repository in sync with the Subversion one, you should run these commands:</p> <pre><code># Fetch the latest commits from SVN and merge them into the current branch git svn rebase # Push the new commits to GitLab git push origin </code></pre> <h2>Background</h2> <p...
<h2>tl;dr</h2> <p>If you want to keep your GitLab repository in sync with the Subversion one, you should run these commands:</p> <pre><code># Fetch the latest commits from SVN and merge them into the current branch git svn rebase # Push the new commits to GitLab git push origin </code></pre> <h2>Background</h2> <p...
63, 119, 6452
git, git-svn, svn
<h1>Git svn fetch and then commit to remote git</h1> <p>My customer has a SVN repo and I would like to use git on my side instead. I used git-svn to create a git from my customer's svn and created a gitlab for it. If my customer changes something on his side I would like to fetch the changes and then update my gitlab ...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
23,147
git
# Git svn fetch and then commit to remote git My customer has a SVN repo and I would like to use git on my side instead. I used git-svn to create a git from my customer's svn and created a gitlab for it. If my customer changes something on his side I would like to fetch the changes and then update my gitlab to keep ev...
## tl;dr If you want to keep your GitLab repository in sync with the Subversion one, you should run these commands: ``` # Fetch the latest commits from SVN and merge them into the current branch git svn rebase # Push the new commits to GitLab git push origin ``` ## Background Logically speaking, when you run `git ...
36939033
How to see if git binary is using openssl or gnutls?
8
2016-04-29 12:59:57
<p>I'm trying to debug a strange issue with git clone, https protocol, of one specific repo using Ubuntu with a corporate proxy. The same thing works in CentOS, Fedora distros but not on Ubuntu or Debian in our environment.</p> <p>Apparently in Ubuntu packages git is using gnutls, but on other platform openssl. Howeve...
7,140
365,237
2023-08-12 03:57:27
36,939,340
12
2016-04-29 13:14:25
365,237
2021-06-11 06:04:24
https://stackoverflow.com/q/36939033
https://stackoverflow.com/a/36939340
<pre><code>$ cd /usr/lib/git-core $ ./git --version git version 1.9.1 $ ldd git-http-fetch | grep libcurl libcurl-gnutls.so.4 =&gt; /usr/lib/x86_64-linux-gnu/libcurl-gnutls.so.4 (0x00007f8d5dcdf000) $ cd /usr/libexec/git-core $ ./git --version git version 2.8.1 $ ldd git-http-fetch | grep libcurl libcurl-gnutl...
<pre><code>$ cd /usr/lib/git-core $ ./git --version git version 1.9.1 $ ldd git-http-fetch | grep libcurl libcurl-gnutls.so.4 =&gt; /usr/lib/x86_64-linux-gnu/libcurl-gnutls.so.4 (0x00007f8d5dcdf000) $ cd /usr/libexec/git-core $ ./git --version git version 2.8.1 $ ldd git-http-fetch | grep libcurl libcurl-gnutl...
119, 549, 12163, 84673, 103312
git, gnutls, libcurl, ubuntu, ubuntu-14.04
<h1>How to see if git binary is using openssl or gnutls?</h1> <p>I'm trying to debug a strange issue with git clone, https protocol, of one specific repo using Ubuntu with a corporate proxy. The same thing works in CentOS, Fedora distros but not on Ubuntu or Debian in our environment.</p> <p>Apparently in Ubuntu packa...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
23,148
git
# How to see if git binary is using openssl or gnutls? I'm trying to debug a strange issue with git clone, https protocol, of one specific repo using Ubuntu with a corporate proxy. The same thing works in CentOS, Fedora distros but not on Ubuntu or Debian in our environment. Apparently in Ubuntu packages git is using...
``` $ cd /usr/lib/git-core $ ./git --version git version 1.9.1 $ ldd git-http-fetch | grep libcurl libcurl-gnutls.so.4 => /usr/lib/x86_64-linux-gnu/libcurl-gnutls.so.4 (0x00007f8d5dcdf000) $ cd /usr/libexec/git-core $ ./git --version git version 2.8.1 $ ldd git-http-fetch | grep libcurl libcurl-gnutls.so.4 => ...
24636289
git-p4: fatal: git was built without support for git-p4 (NO_PYTHON=1)
8
2014-07-08 15:50:07
<p>I am trying to use git p4 on my Linux computer. But there seems to be a problem with git-p4 for some reason. When I run the git p4 command I get:</p> <pre><code>fatal: git was built without support for git-p4 (NO_PYTHON=1) </code></pre> <p>Any idea why this message is being displayed? Is there anyway I can fix it?...
4,893
3,767,386
2016-02-12 10:56:16
35,360,825
12
2016-02-12 10:56:16
96,569
2016-02-12 10:56:16
https://stackoverflow.com/q/24636289
https://stackoverflow.com/a/35360825
<p>You could download the <code>git-p4.py</code> file and move it to the right directory:</p> <pre class="lang-sh prettyprint-override"><code>wget http://git.kernel.org/cgit/git/git.git/plain/git-p4.py?id=master -O git-p4 &amp;&amp; chmod +x git-p4 sudo mv git-p4 /usr/lib/git-core/ </code></pre>
<p>You could download the <code>git-p4.py</code> file and move it to the right directory:</p> <pre class="lang-sh prettyprint-override"><code>wget http://git.kernel.org/cgit/git/git.git/plain/git-p4.py?id=master -O git-p4 &amp;&amp; chmod +x git-p4 sudo mv git-p4 /usr/lib/git-core/ </code></pre>
119, 1286, 8025, 55021
git, git-p4, p4v, perforce
<h1>git-p4: fatal: git was built without support for git-p4 (NO_PYTHON=1)</h1> <p>I am trying to use git p4 on my Linux computer. But there seems to be a problem with git-p4 for some reason. When I run the git p4 command I get:</p> <pre><code>fatal: git was built without support for git-p4 (NO_PYTHON=1) </code></pre> ...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
23,149
git
# git-p4: fatal: git was built without support for git-p4 (NO_PYTHON=1) I am trying to use git p4 on my Linux computer. But there seems to be a problem with git-p4 for some reason. When I run the git p4 command I get: ``` fatal: git was built without support for git-p4 (NO_PYTHON=1) ``` Any idea why this message is ...
You could download the `git-p4.py` file and move it to the right directory: ``` wget http://git.kernel.org/cgit/git/git.git/plain/git-p4.py?id=master -O git-p4 && chmod +x git-p4 sudo mv git-p4 /usr/lib/git-core/ ```
29245292
How can I make git tell curl to use openssl instead of gnutls without rebuilding the package?
8
2015-03-25 00:12:19
<p>We have an internal server that GnuTLS doesn't like, e.g:</p> <pre><code>gnutls-cli --x509cafile /etc/ssl/certs/ca-certificates.crt foo.example.com Processed 173 CA certificate(s). Resolving 'foo.example.com'... Connecting to '1.2.3.4:443'... *** Verifying server certificate failed... *** Fatal error: Error in the ...
11,595
2,066,278
2016-01-08 21:39:34
34,645,007
12
2016-01-06 23:47:44
93,747
2016-01-08 21:39:34
https://stackoverflow.com/q/29245292
https://stackoverflow.com/a/34645007
<p>git is built to use libcurl, libcurl is built to use a single fixed TLS library that cannot be changed in run-time.</p> <p>You can however force git to use a different libcurl build at run-time, and that libcurl could be using OpenSSL. That's easiest done by putting that OpenSSL-using libcurl in a separate director...
<p>git is built to use libcurl, libcurl is built to use a single fixed TLS library that cannot be changed in run-time.</p> <p>You can however force git to use a different libcurl build at run-time, and that libcurl could be using OpenSSL. That's easiest done by putting that OpenSSL-using libcurl in a separate director...
119, 549, 1554, 1999, 84673
curl, git, gnutls, openssl, ubuntu
<h1>How can I make git tell curl to use openssl instead of gnutls without rebuilding the package?</h1> <p>We have an internal server that GnuTLS doesn't like, e.g:</p> <pre><code>gnutls-cli --x509cafile /etc/ssl/certs/ca-certificates.crt foo.example.com Processed 173 CA certificate(s). Resolving 'foo.example.com'... C...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
23,151
git
# How can I make git tell curl to use openssl instead of gnutls without rebuilding the package? We have an internal server that GnuTLS doesn't like, e.g: ``` gnutls-cli --x509cafile /etc/ssl/certs/ca-certificates.crt foo.example.com Processed 173 CA certificate(s). Resolving 'foo.example.com'... Connecting to '1.2.3....
git is built to use libcurl, libcurl is built to use a single fixed TLS library that cannot be changed in run-time. You can however force git to use a different libcurl build at run-time, and that libcurl could be using OpenSSL. That's easiest done by putting that OpenSSL-using libcurl in a separate directory from the...
34411468
checkout a specific tag with git subtree
8
2015-12-22 08:30:38
<p>Can I use tags in subtrees? Following a specific issue:</p> <p>I have a git repository which includes an external repository as a subtree. I could add this external repository and checkout a specific branch from this repo. With <code>git subtree pull --prefix=&lt;dir&gt; --squash &lt;remote&gt; &lt;branch&gt;</code...
10,359
4,295,389
2019-10-18 15:49:18
34,412,489
12
2015-12-22 09:30:01
1,264,116
2015-12-22 09:30:01
https://stackoverflow.com/q/34411468
https://stackoverflow.com/a/34412489
<p>Actually any reference should work. The man page for subtree displays this.</p> <pre><code>git subtree pull -P &lt;prefix&gt; &lt;repository&gt; &lt;ref&gt; </code></pre> <p>Where <code>&lt;ref&gt;</code> can be a SHA, tag or branch. Basically anything git can resolve to a commit.</p>
<p>Actually any reference should work. The man page for subtree displays this.</p> <pre><code>git subtree pull -P &lt;prefix&gt; &lt;repository&gt; &lt;ref&gt; </code></pre> <p>Where <code>&lt;ref&gt;</code> can be a SHA, tag or branch. Basically anything git can resolve to a commit.</p>
119, 60718, 68200
git, git-subtree, git-tag
<h1>checkout a specific tag with git subtree</h1> <p>Can I use tags in subtrees? Following a specific issue:</p> <p>I have a git repository which includes an external repository as a subtree. I could add this external repository and checkout a specific branch from this repo. With <code>git subtree pull --prefix=&lt;di...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
23,152
git
# checkout a specific tag with git subtree Can I use tags in subtrees? Following a specific issue: I have a git repository which includes an external repository as a subtree. I could add this external repository and checkout a specific branch from this repo. With `git subtree pull --prefix=<dir> --squash <remote> <br...
Actually any reference should work. The man page for subtree displays this. ``` git subtree pull -P <prefix> <repository> <ref> ``` Where `<ref>` can be a SHA, tag or branch. Basically anything git can resolve to a commit.
33168230
JGit create new local branch and push to remote (branch does not exist on remote)
8
2015-10-16 10:28:32
<p>I'm working on an ANT task that calls some java that uses JGit to create a new branch on a git repository and push it to remote. I'm using JGit 2.1.0.</p> <p>Here's the code:</p> <pre><code>CreateBranchCommand bcc; CheckoutCommand checkout; Git git; try { Repository repo = new FileRepositoryBuilder().readEnvi...
15,334
1,860,867
2020-08-04 03:00:21
33,169,449
12
2015-10-16 11:32:43
2,986,905
2020-08-04 03:00:21
https://stackoverflow.com/q/33168230
https://stackoverflow.com/a/33169449
<p>Use <code>setStartPoint()</code> to specify what the new branch should be based upon. The commit to which <code>setStartPoint</code> points will be the initial commit for the new branch.</p> <p>If the start point isn't explicitly specified, it defaults to <code>HEAD</code>. Please see the Git documentation for more ...
<p>Use <code>setStartPoint()</code> to specify what the new branch should be based upon. The commit to which <code>setStartPoint</code> points will be the initial commit for the new branch.</p> <p>If the start point isn't explicitly specified, it defaults to <code>HEAD</code>. Please see the Git documentation for more ...
17, 119, 37230, 61058, 76220
git, git-branch, git-checkout, java, jgit
<h1>JGit create new local branch and push to remote (branch does not exist on remote)</h1> <p>I'm working on an ANT task that calls some java that uses JGit to create a new branch on a git repository and push it to remote. I'm using JGit 2.1.0.</p> <p>Here's the code:</p> <pre><code>CreateBranchCommand bcc; CheckoutC...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
23,153
git
# JGit create new local branch and push to remote (branch does not exist on remote) I'm working on an ANT task that calls some java that uses JGit to create a new branch on a git repository and push it to remote. I'm using JGit 2.1.0. Here's the code: ``` CreateBranchCommand bcc; CheckoutCommand checkout; Git git; ...
Use `setStartPoint()` to specify what the new branch should be based upon. The commit to which `setStartPoint` points will be the initial commit for the new branch. If the start point isn't explicitly specified, it defaults to `HEAD`. Please see the Git documentation for more details: <https://git-scm.com/docs/git-bra...
17792509
Git checkout without clone
8
2013-07-22 16:16:28
<p>I am very much new to Git. Can anyone help me understand the follwoing.</p> <ol> <li>I am working on a build script that first checks out/update code from remote repository. I have nothing to do with the local machine . Do still I need to clone the remote repo in my local and checkout code afterwards.</li> <li>If I...
10,248
1,185,665
2017-11-10 15:24:35
31,733,152
12
2015-07-30 20:12:31
245,988
2015-07-30 20:12:31
https://stackoverflow.com/q/17792509
https://stackoverflow.com/a/31733152
<p>I've found a very helpful git clone syntax for doing builds where you do not need the entire git history of revisions. Note that this seems to require Git version 1.9+:</p> <pre><code>git clone -b &lt;remoteBranch&gt; --single-branch --depth 1 ssh://username@servername.net:serverport/PathToProject &lt;FolderName&gt...
<p>I've found a very helpful git clone syntax for doing builds where you do not need the entire git history of revisions. Note that this seems to require Git version 1.9+:</p> <pre><code>git clone -b &lt;remoteBranch&gt; --single-branch --depth 1 ssh://username@servername.net:serverport/PathToProject &lt;FolderName&gt...
119, 37230
git, git-checkout
<h1>Git checkout without clone</h1> <p>I am very much new to Git. Can anyone help me understand the follwoing.</p> <ol> <li>I am working on a build script that first checks out/update code from remote repository. I have nothing to do with the local machine . Do still I need to clone the remote repo in my local and che...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
23,154
git
# Git checkout without clone I am very much new to Git. Can anyone help me understand the follwoing. 1. I am working on a build script that first checks out/update code from remote repository. I have nothing to do with the local machine . Do still I need to clone the remote repo in my local and checkout code afterwar...
I've found a very helpful git clone syntax for doing builds where you do not need the entire git history of revisions. Note that this seems to require Git version 1.9+: ``` git clone -b <remoteBranch> --single-branch --depth 1 ssh://username@servername.net:serverport/PathToProject <FolderName> ``` Notes: This clones...
31307159
PyCharm: multiple projects in same window, independent version control
8
2015-07-09 02:36:29
<p>I use PyCharm to work on relatively short, purpose-built scripts under local version control with Git.</p> <p>Until recently, I did not use version control at all. My preferred method of working was to open multiple files in tabs in the same PyCharm project, and treat them all independently.</p> <p>Is there a way ...
6,585
3,076,552
2015-07-18 17:00:17
31,493,293
12
2015-07-18 16:36:09
3,076,552
2015-07-18 17:00:17
https://stackoverflow.com/q/31307159
https://stackoverflow.com/a/31493293
<p>After some investigation, and the help of Fred Reimer on the <a href="http://forum.jetbrains.com/thread/PyCharm-14634?message=PyCharm-14634-6" rel="noreferrer">Jetbrains forums</a>, I believe the answer to this question is "yes, multiple projects with independent Git repos can be managed within a single window in Py...
<p>After some investigation, and the help of Fred Reimer on the <a href="http://forum.jetbrains.com/thread/PyCharm-14634?message=PyCharm-14634-6" rel="noreferrer">Jetbrains forums</a>, I believe the answer to this question is "yes, multiple projects with independent Git repos can be managed within a single window in Py...
16, 119, 456, 51298
git, pycharm, python, version-control
<h1>PyCharm: multiple projects in same window, independent version control</h1> <p>I use PyCharm to work on relatively short, purpose-built scripts under local version control with Git.</p> <p>Until recently, I did not use version control at all. My preferred method of working was to open multiple files in tabs in the...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
23,155
git
# PyCharm: multiple projects in same window, independent version control I use PyCharm to work on relatively short, purpose-built scripts under local version control with Git. Until recently, I did not use version control at all. My preferred method of working was to open multiple files in tabs in the same PyCharm pr...
After some investigation, and the help of Fred Reimer on the [Jetbrains forums](http://forum.jetbrains.com/thread/PyCharm-14634?message=PyCharm-14634-6), I believe the answer to this question is "yes, multiple projects with independent Git repos can be managed within a single window in PyCharm". Here is a toy example t...
31424796
Using Vundle behind Proxy
8
2015-07-15 08:05:10
<p>We have have this neat little script at work that let's us use the internet over proxy from the linux enviroment. For example</p> <pre><code>withproxy git clone https://github.com/VundleVim/Vundle.vim.git </code></pre> <p>works just fine and doesn't even prompt me for my username and password.</p> <p>How do I set...
7,020
998,232
2015-07-15 10:06:32
31,427,411
12
2015-07-15 10:06:32
1,658,042
2015-07-15 10:06:32
https://stackoverflow.com/q/31424796
https://stackoverflow.com/a/31427411
<blockquote> <p>How do I set this up within the <code>.vimrc</code> for Vundle so that all the git things are prefixed by this proxy script?</p> </blockquote> <p>You don't. What you do instead is make <code>git</code> go through the proxy:</p> <pre><code>git config --global http.proxy http://username:password@prox...
<blockquote> <p>How do I set this up within the <code>.vimrc</code> for Vundle so that all the git things are prefixed by this proxy script?</p> </blockquote> <p>You don't. What you do instead is make <code>git</code> go through the proxy:</p> <pre><code>git config --global http.proxy http://username:password@prox...
119, 370, 760, 92385
git, proxy, vim, vundle
<h1>Using Vundle behind Proxy</h1> <p>We have have this neat little script at work that let's us use the internet over proxy from the linux enviroment. For example</p> <pre><code>withproxy git clone https://github.com/VundleVim/Vundle.vim.git </code></pre> <p>works just fine and doesn't even prompt me for my username...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
23,156
git
# Using Vundle behind Proxy We have have this neat little script at work that let's us use the internet over proxy from the linux enviroment. For example ``` withproxy git clone https://github.com/VundleVim/Vundle.vim.git ``` works just fine and doesn't even prompt me for my username and password. How do I set this...
> How do I set this up within the `.vimrc` for Vundle so that all the git things are prefixed by this proxy script? You don't. What you do instead is make `git` go through the proxy: ``` git config --global http.proxy http://username:password@proxy.example.com:8080 ``` You can also set the environment variable `http...
30680718
How can I rebase from a remote tag onto local master
8
2015-06-06 08:35:38
<p>I cloned an open source third-party repository and started working locally, committing to local master.</p> <p>The remote github repository now has a tag called 8.1.1</p> <p>Whats the best way to rebase from that remote tag? I want to pull in the latest changes from that release only and then replay my changes on ...
6,352
69,346
2015-06-06 08:38:41
30,680,738
12
2015-06-06 08:38:41
717,732
2015-06-06 08:38:41
https://stackoverflow.com/q/30680718
https://stackoverflow.com/a/30680738
<p>While being on that <code>detached head</code> pointing to <code>tags/8.1.1</code>, create a (local) <em>branch</em> at that very place, for example <code>ver_8_1_1</code>. Then switch to your (local) master and do a normal rebase onto that branch.</p> <pre><code>git checkout tags/8.1.1 # you are here git branch...
<p>While being on that <code>detached head</code> pointing to <code>tags/8.1.1</code>, create a (local) <em>branch</em> at that very place, for example <code>ver_8_1_1</code>. Then switch to your (local) master and do a normal rebase onto that branch.</p> <pre><code>git checkout tags/8.1.1 # you are here git branch...
119, 29934
git, git-rebase
<h1>How can I rebase from a remote tag onto local master</h1> <p>I cloned an open source third-party repository and started working locally, committing to local master.</p> <p>The remote github repository now has a tag called 8.1.1</p> <p>Whats the best way to rebase from that remote tag? I want to pull in the latest...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
23,157
git
# How can I rebase from a remote tag onto local master I cloned an open source third-party repository and started working locally, committing to local master. The remote github repository now has a tag called 8.1.1 Whats the best way to rebase from that remote tag? I want to pull in the latest changes from that rele...
While being on that `detached head` pointing to `tags/8.1.1`, create a (local) *branch* at that very place, for example `ver_8_1_1`. Then switch to your (local) master and do a normal rebase onto that branch. ``` git checkout tags/8.1.1 # you are here git branch ver_8_1_1 git checkout master git rebase -i ver_8_1_1...
30141219
Where is my .git/refs/heads/master file
8
2015-05-09 14:39:36
<p>I am following below article to get some idea of internals of git.</p> <p><a href="http://git-scm.com/book/en/v2/Git-Internals-Git-References" rel="noreferrer">http://git-scm.com/book/en/v2/Git-Internals-Git-References</a></p> <p>It says that git stores references to latest commit objects of each branch in <code>....
4,665
1,015,678
2017-11-26 21:04:18
30,143,136
12
2015-05-09 17:42:26
1,290,731
2015-05-09 17:42:26
https://stackoverflow.com/q/30141219
https://stackoverflow.com/a/30143136
<p>Then there's going to be a file named <code>.git/packed-refs</code> there too. When repository histories start getting really long, having hundreds of tags starts to slow things down, so <a href="ftp://www.kernel.org/pub/software/scm/git/docs/git-pack-refs.html" rel="noreferrer"><code>git pack-refs</code></a> wil...
<p>Then there's going to be a file named <code>.git/packed-refs</code> there too. When repository histories start getting really long, having hundreds of tags starts to slow things down, so <a href="ftp://www.kernel.org/pub/software/scm/git/docs/git-pack-refs.html" rel="noreferrer"><code>git pack-refs</code></a> wil...
119
git
<h1>Where is my .git/refs/heads/master file</h1> <p>I am following below article to get some idea of internals of git.</p> <p><a href="http://git-scm.com/book/en/v2/Git-Internals-Git-References" rel="noreferrer">http://git-scm.com/book/en/v2/Git-Internals-Git-References</a></p> <p>It says that git stores references t...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
23,158
git
# Where is my .git/refs/heads/master file I am following below article to get some idea of internals of git. <http://git-scm.com/book/en/v2/Git-Internals-Git-References> It says that git stores references to latest commit objects of each branch in `.git/refs/heads` directory. In one of my git repositories, I found ...
Then there's going to be a file named `.git/packed-refs` there too. When repository histories start getting really long, having hundreds of tags starts to slow things down, so [`git pack-refs`](ftp://www.kernel.org/pub/software/scm/git/docs/git-pack-refs.html) will put them all in the `packed-refs` file. Yay for going...
30119874
git pull --rebase - how to proceed after conflict resolution
8
2015-05-08 09:02:20
<p>I'm doing <code>git pull --rebase</code> and get a conflict. After I resolve a conflict, git show me that I'm in the middle of a merge. If I was doing a simple merge, I'd just add resolved files to the index and do a manual commit. But since I'm also rebasing how do I proceed to have other commits applied after I've...
8,209
2,545,680
2015-05-08 09:11:34
30,120,031
12
2015-05-08 09:11:34
1,992,669
2015-05-08 09:11:34
https://stackoverflow.com/q/30119874
https://stackoverflow.com/a/30120031
<p>When you used <code>git pull --rebase</code> and got conflicts, git displayed :</p> <blockquote> <p>When you have resolved this problem, run &quot;git rebase --continue&quot;.</p> <p>If you prefer to skip this patch, run &quot;git rebase --skip&quot; instead.</p> <p>To check out the original branch and stop rebasing...
<p>When you used <code>git pull --rebase</code> and got conflicts, git displayed :</p> <blockquote> <p>When you have resolved this problem, run &quot;git rebase --continue&quot;.</p> <p>If you prefer to skip this patch, run &quot;git rebase --skip&quot; instead.</p> <p>To check out the original branch and stop rebasing...
119
git
<h1>git pull --rebase - how to proceed after conflict resolution</h1> <p>I'm doing <code>git pull --rebase</code> and get a conflict. After I resolve a conflict, git show me that I'm in the middle of a merge. If I was doing a simple merge, I'd just add resolved files to the index and do a manual commit. But since I'm a...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
23,159
git
# git pull --rebase - how to proceed after conflict resolution I'm doing `git pull --rebase` and get a conflict. After I resolve a conflict, git show me that I'm in the middle of a merge. If I was doing a simple merge, I'd just add resolved files to the index and do a manual commit. But since I'm also rebasing how do ...
When you used `git pull --rebase` and got conflicts, git displayed : > When you have resolved this problem, run "git rebase --continue". > > If you prefer to skip this patch, run "git rebase --skip" instead. > > To check out the original branch and stop rebasing, run "git rebase --abort". In your case, you should use...
29507763
Renaming a remote (bare) repository with git
8
2015-04-08 06:48:25
<p>I run a <code>git</code> server which contains only the bare remotes. Say, I have one bare remote called <code>DIG.git</code> which I usually clone with:</p> <pre><code>git clone 55.66.77.88:git/DIG.git </code></pre> <p>and I want to rename the bare remote on the server from <code>DIG.git</code> to <code>DIGit</co...
3,029
2,734,224
2015-04-08 06:55:31
29,507,895
12
2015-04-08 06:55:31
6,309
2015-04-08 06:55:31
https://stackoverflow.com/q/29507763
https://stackoverflow.com/a/29507895
<p>You can rename the top folder of a git repo (bare or not) anyway you want.</p> <p>It simply is the naming convention to have a .git extension to that folder when it is a bare repo, but this isn't mandatory.</p> <p>Once you have renamed the repo on the server, you would have to change its origin url on the local cl...
<p>You can rename the top folder of a git repo (bare or not) anyway you want.</p> <p>It simply is the naming convention to have a .git extension to that folder when it is a bare repo, but this isn't mandatory.</p> <p>Once you have renamed the repo on the server, you would have to change its origin url on the local cl...
119, 456
git, version-control
<h1>Renaming a remote (bare) repository with git</h1> <p>I run a <code>git</code> server which contains only the bare remotes. Say, I have one bare remote called <code>DIG.git</code> which I usually clone with:</p> <pre><code>git clone 55.66.77.88:git/DIG.git </code></pre> <p>and I want to rename the bare remote on t...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
23,160
git
# Renaming a remote (bare) repository with git I run a `git` server which contains only the bare remotes. Say, I have one bare remote called `DIG.git` which I usually clone with: ``` git clone 55.66.77.88:git/DIG.git ``` and I want to rename the bare remote on the server from `DIG.git` to `DIGit` so that I can do `...
You can rename the top folder of a git repo (bare or not) anyway you want. It simply is the naming convention to have a .git extension to that folder when it is a bare repo, but this isn't mandatory. Once you have renamed the repo on the server, you would have to change its origin url on the local clone that you did ...
27938850
"git rm" - what is the meaning of "-rf"?
8
2015-01-14 08:48:11
<p>What is the meaning of "-rf" in git?</p> <p>I used </p> <pre><code>git rm -rf directories </code></pre> <p>but I don't know the actual meaning of -rf</p>
7,976
2,210,933
2022-03-02 09:10:24
27,938,894
12
2015-01-14 08:50:53
380,774
2015-01-14 08:50:53
https://stackoverflow.com/q/27938850
https://stackoverflow.com/a/27938894
<p><code>-r</code> - Allow recursive removal when a leading directory name is given.</p> <p><code>-f</code> - Override the up-to-date check.</p> <p>More: <code>git help rm</code></p>
<p><code>-r</code> - Allow recursive removal when a leading directory name is given.</p> <p><code>-f</code> - Override the up-to-date check.</p> <p>More: <code>git help rm</code></p>
119
git
<h1>"git rm" - what is the meaning of "-rf"?</h1> <p>What is the meaning of "-rf" in git?</p> <p>I used </p> <pre><code>git rm -rf directories </code></pre> <p>but I don't know the actual meaning of -rf</p>
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
23,161
git
# "git rm" - what is the meaning of "-rf"? What is the meaning of "-rf" in git? I used ``` git rm -rf directories ``` but I don't know the actual meaning of -rf
`-r` - Allow recursive removal when a leading directory name is given. `-f` - Override the up-to-date check. More: `git help rm`
25884007
Disable git add . command
8
2014-09-17 06:47:02
<p>Many times I mistakenly add unwanted files to the staging area using the <code>git add .</code> command.</p> <p>I wonder if there is a way I could completely disable this command, so that I only use <code>git add file</code>?</p>
4,084
null
2015-03-25 00:34:04
25,886,149
12
2014-09-17 08:52:39
2,541,573
2015-03-25 00:34:04
https://stackoverflow.com/q/25884007
https://stackoverflow.com/a/25886149
<h2>SVN re-education</h2> <blockquote> <p>I guess it is a bad habit from svn, which has a default to add only tracked files [...]</p> </blockquote> <p>You must unlearn what you have learned :)</p> <p>You should run <code>git status</code> often. If files you want to ignore get listed as untracked files, you should...
<h2>SVN re-education</h2> <blockquote> <p>I guess it is a bad habit from svn, which has a default to add only tracked files [...]</p> </blockquote> <p>You must unlearn what you have learned :)</p> <p>You should run <code>git status</code> often. If files you want to ignore get listed as untracked files, you should...
119, 34792
git, git-add
<h1>Disable git add . command</h1> <p>Many times I mistakenly add unwanted files to the staging area using the <code>git add .</code> command.</p> <p>I wonder if there is a way I could completely disable this command, so that I only use <code>git add file</code>?</p>
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
23,162
git
# Disable git add . command Many times I mistakenly add unwanted files to the staging area using the `git add .` command. I wonder if there is a way I could completely disable this command, so that I only use `git add file`?
## SVN re-education > I guess it is a bad habit from svn, which has a default to add only tracked files [...] You must unlearn what you have learned :) You should run `git status` often. If files you want to ignore get listed as untracked files, you should then edit your `.gitignore` file, so that those files actual...
25488138
Move initial commits off master to another branch in Git
8
2014-08-25 14:26:13
<p>I'm trying to migrate to the GitFlow workflow, and I want rewrite the history of the repository so that all of it complies with the new repository.</p> <p>At the moment it looks like this:</p> <pre><code>Master: A - B - C - D - E - F - - - - - - - - - L \ / Release: ...
1,939
2,073,037
2015-06-29 10:04:45
25,490,288
12
2014-08-25 16:25:50
2,541,573
2015-06-29 10:04:45
https://stackoverflow.com/q/25488138
https://stackoverflow.com/a/25490288
<p>In Git, as pointed out by larsmans in <a href="https://stackoverflow.com/questions/25488138/move-initial-commits-off-master-to-another-branch-in-git/25490288#comment39780926_25488138">his comment</a>, a branch is simply a pointer/reference to a particular commit. Labelling codelines with branch names as you did on t...
<p>In Git, as pointed out by larsmans in <a href="https://stackoverflow.com/questions/25488138/move-initial-commits-off-master-to-another-branch-in-git/25490288#comment39780926_25488138">his comment</a>, a branch is simply a pointer/reference to a particular commit. Labelling codelines with branch names as you did on t...
119
git
<h1>Move initial commits off master to another branch in Git</h1> <p>I'm trying to migrate to the GitFlow workflow, and I want rewrite the history of the repository so that all of it complies with the new repository.</p> <p>At the moment it looks like this:</p> <pre><code>Master: A - B - C - D - E - F - - - - - - - -...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
23,163
git
# Move initial commits off master to another branch in Git I'm trying to migrate to the GitFlow workflow, and I want rewrite the history of the repository so that all of it complies with the new repository. At the moment it looks like this: ``` Master: A - B - C - D - E - F - - - - - - - - - L ...
In Git, as pointed out by larsmans in [his comment](https://stackoverflow.com/questions/25488138/move-initial-commits-off-master-to-another-branch-in-git/25490288#comment39780926_25488138), a branch is simply a pointer/reference to a particular commit. Labelling codelines with branch names as you did on the left-hand s...