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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
15672613 | Extended regular expressions (ERE) for .gitignore | 35 | 2013-03-28 01:22:05 | <p>Is there a way to use extended regular expressions(ERE) in a <code>.gitignore</code> file? For example I want to use the <code>+</code> repetition character in a <code>.gitignore</code> file. Is there a way to do that?</p>
| 23,753 | 1,007,758 | 2015-05-26 05:45:08 | 15,676,377 | 34 | 2013-03-28 07:28:17 | 6,309 | 2015-05-26 05:45:08 | https://stackoverflow.com/q/15672613 | https://stackoverflow.com/a/15676377 | <p>As illustrated <a href="https://stackoverflow.com/a/1470664/6309">here</a> and detailed in "<a href="https://stackoverflow.com/a/2902126/6309">this question</a>", the function <a href="http://pubs.opengroup.org/onlinepubs/000095399/functions/fnmatch.html" rel="noreferrer">fnmatch()</a> is involved to interpret glob ... | <p>As illustrated <a href="https://stackoverflow.com/a/1470664/6309">here</a> and detailed in "<a href="https://stackoverflow.com/a/2902126/6309">this question</a>", the function <a href="http://pubs.opengroup.org/onlinepubs/000095399/functions/fnmatch.html" rel="noreferrer">fnmatch()</a> is involved to interpret glob ... | 18, 119, 25056, 77839 | git, gitignore, metacharacters, regex | <h1>Extended regular expressions (ERE) for .gitignore</h1>
<p>Is there a way to use extended regular expressions(ERE) in a <code>.gitignore</code> file? For example I want to use the <code>+</code> repetition character in a <code>.gitignore</code> file. Is there a way to do that?</p>
| q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 18,529 | git | # Extended regular expressions (ERE) for .gitignore
Is there a way to use extended regular expressions(ERE) in a `.gitignore` file? For example I want to use the `+` repetition character in a `.gitignore` file. Is there a way to do that? | As illustrated [here](https://stackoverflow.com/a/1470664/6309) and detailed in "[this question](https://stackoverflow.com/a/2902126/6309)", the function [fnmatch()](http://pubs.opengroup.org/onlinepubs/000095399/functions/fnmatch.html) is involved to interpret glob patterns, which means regular expressions are not sup... |
22043111 | Delete and Redeploy Rails app to heroku | 32 | 2014-02-26 13:37:59 | <p>I have a rails app that is deployed to Heroku. I recently made a ton of changes, deleted old migrations, recreated new migrations, rebased and dealt with merge conflicts....the list goes on.</p>
<p>Now, I want to wipe my entire heroku "production" app from heroku and redeploy my code from my github <code>master</co... | 54,018 | 2,665,588 | 2018-12-29 05:48:50 | 22,043,429 | 34 | 2014-02-26 13:52:26 | 1,219,460 | 2014-02-26 13:52:26 | https://stackoverflow.com/q/22043111 | https://stackoverflow.com/a/22043429 | <p>If you don't want to delete the entire application (perhaps you want to keep your add-ons and other configuration the same), you can reset the database and force update the code. </p>
<p>Deploy your new code, forcing the update by using the <code>-f</code> flag:</p>
<pre><code>git push heroku master -f
</code></pr... | <p>If you don't want to delete the entire application (perhaps you want to keep your add-ons and other configuration the same), you can reset the database and force update the code. </p> <p>Deploy your new code, forcing the update by using the <code>-f</code> flag:</p> <pre><code>git push heroku master -f </code></pr... | 119, 4984, 8279 | git, heroku, ruby-on-rails | <h1>Delete and Redeploy Rails app to heroku</h1>
<p>I have a rails app that is deployed to Heroku. I recently made a ton of changes, deleted old migrations, recreated new migrations, rebased and dealt with merge conflicts....the list goes on.</p>
<p>Now, I want to wipe my entire heroku "production" app from heroku and... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 18,532 | git | # Delete and Redeploy Rails app to heroku
I have a rails app that is deployed to Heroku. I recently made a ton of changes, deleted old migrations, recreated new migrations, rebased and dealt with merge conflicts....the list goes on.
Now, I want to wipe my entire heroku "production" app from heroku and redeploy my cod... | If you don't want to delete the entire application (perhaps you want to keep your add-ons and other configuration the same), you can reset the database and force update the code.
Deploy your new code, forcing the update by using the `-f` flag:
```
git push heroku master -f
```
Drop and recreate the database:
```
he... |
14754632 | How to resume Git-Flow after a break cause by a merge conflict on a finish command? | 31 | 2013-02-07 15:20:32 | <p>Do i really need to complete all the step by hand every time I "Finish" a branch and there is a conflict merging it with Git-Flow? Or there's a way to resume after all the conflict are solved?</p>
| 15,534 | 1,977,626 | 2013-09-16 06:28:43 | 18,821,627 | 34 | 2013-09-16 06:28:43 | 620,856 | 2013-09-16 06:28:43 | https://stackoverflow.com/q/14754632 | https://stackoverflow.com/a/18821627 | <p>After resolving the conflict, you simply call</p>
<pre><code>git flow release finish [RELEASE_NAME]
</code></pre>
<p>again.
git is 'smart' in that if you try to do merge from branch A to branch B more than once, the second and subsequent times are ignored with "Already up-to-date" as long as the source of the merg... | <p>After resolving the conflict, you simply call</p> <pre><code>git flow release finish [RELEASE_NAME] </code></pre> <p>again. git is 'smart' in that if you try to do merge from branch A to branch B more than once, the second and subsequent times are ignored with "Already up-to-date" as long as the source of the merg... | 119, 64339 | git, git-flow | <h1>How to resume Git-Flow after a break cause by a merge conflict on a finish command?</h1>
<p>Do i really need to complete all the step by hand every time I "Finish" a branch and there is a conflict merging it with Git-Flow? Or there's a way to resume after all the conflict are solved?</p>
| q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 18,535 | git | # How to resume Git-Flow after a break cause by a merge conflict on a finish command?
Do i really need to complete all the step by hand every time I "Finish" a branch and there is a conflict merging it with Git-Flow? Or there's a way to resume after all the conflict are solved? | After resolving the conflict, you simply call
```
git flow release finish [RELEASE_NAME]
```
again.
git is 'smart' in that if you try to do merge from branch A to branch B more than once, the second and subsequent times are ignored with "Already up-to-date" as long as the source of the merge has not changed. |
11268930 | How to git revert a commit using a SHA | 31 | 2012-06-29 21:04:46 | <p>How can I revert a commit with a GIVEN SHA? I just want to remove the changes with a given SHA? I want to keep all the commits made BEFORE & AFTER the give SHA. I just want to remove changes of that specified SHA.</p>
<p>I have read <a href="https://stackoverflow.com/questions/1895059/git-revert-to-a-commit-by... | 32,966 | 286,802 | 2023-04-20 08:46:14 | 11,268,992 | 34 | 2012-06-29 21:09:13 | 415,313 | 2012-06-29 21:09:13 | https://stackoverflow.com/q/11268930 | https://stackoverflow.com/a/11268992 | <p>You can use <code>git revert <commit hash></code> to try to revert the changes made by the commit. This will not remove the commit from history, just make changes to undo it as a new commit. In other words you will have the first commit still in history, and an additional commit on the head of your branch whic... | <p>You can use <code>git revert <commit hash></code> to try to revert the changes made by the commit. This will not remove the commit from history, just make changes to undo it as a new commit. In other words you will have the first commit still in history, and an additional commit on the head of your branch whic... | 119, 34403 | git, git-revert | <h1>How to git revert a commit using a SHA</h1>
<p>How can I revert a commit with a GIVEN SHA? I just want to remove the changes with a given SHA? I want to keep all the commits made BEFORE & AFTER the give SHA. I just want to remove changes of that specified SHA.</p>
<p>I have read <a href="https://stackoverflow... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 18,536 | git | # How to git revert a commit using a SHA
How can I revert a commit with a GIVEN SHA? I just want to remove the changes with a given SHA? I want to keep all the commits made BEFORE & AFTER the give SHA. I just want to remove changes of that specified SHA.
I have read [Revert to a commit by a SHA hash in Git?](https://... | You can use `git revert <commit hash>` to try to revert the changes made by the commit. This will not remove the commit from history, just make changes to undo it as a new commit. In other words you will have the first commit still in history, and an additional commit on the head of your branch which is the effective i... |
71364717 | git gc: error: Could not read 0000000000000000000000000000000000000000 | 29 | 2022-03-05 18:10:20 | <pre><code>git gc
error: Could not read 0000000000000000000000000000000000000000
Enumerating objects: 147323, done.
Counting objects: 100% (147323/147323), done.
Delta compression using up to 4 threads
Compressing objects: 100% (36046/36046), done.
Writing objects: 100% (147323/147323), done.
Total 147323 (delta 91195)... | 8,573 | 4,130,619 | 2024-03-01 17:44:53 | 71,435,013 | 34 | 2022-03-11 07:26:36 | 6,868,543 | 2022-09-21 12:22:08 | https://stackoverflow.com/q/71364717 | https://stackoverflow.com/a/71435013 | <p>This error is harmless in the sense that it does not indicate a broken repository. It is a bug that was introduced in Git 2.35 and that should be fixed in later releases.
[Edit: This regression was fixed in Git 2.36.0.]</p>
<p>The worst that can happen is that <code>git gc</code> does not prune all objects that are ... | <p>This error is harmless in the sense that it does not indicate a broken repository. It is a bug that was introduced in Git 2.35 and that should be fixed in later releases. [Edit: This regression was fixed in Git 2.36.0.]</p> <p>The worst that can happen is that <code>git gc</code> does not prune all objects that are ... | 119 | git | <h1>git gc: error: Could not read 0000000000000000000000000000000000000000</h1>
<pre><code>git gc
error: Could not read 0000000000000000000000000000000000000000
Enumerating objects: 147323, done.
Counting objects: 100% (147323/147323), done.
Delta compression using up to 4 threads
Compressing objects: 100% (36046/36046... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 18,538 | git | # git gc: error: Could not read 0000000000000000000000000000000000000000
```
git gc
error: Could not read 0000000000000000000000000000000000000000
Enumerating objects: 147323, done.
Counting objects: 100% (147323/147323), done.
Delta compression using up to 4 threads
Compressing objects: 100% (36046/36046), done.
Writ... | This error is harmless in the sense that it does not indicate a broken repository. It is a bug that was introduced in Git 2.35 and that should be fixed in later releases.
[Edit: This regression was fixed in Git 2.36.0.]
The worst that can happen is that `git gc` does not prune all objects that are referenced from refl... |
8642668 | How to make submodule with detached HEAD to be attached to actual HEAD? | 28 | 2011-12-27 08:45:24 | <p>When I add a Git submodule to a Git repository like this,</p>
<pre><code>git submodule add ssh://server/proj1/ proj1
git submodule init
git submodule update
</code></pre>
<p>the added submodule will be in <em>detached HEAD</em> mode. I don't know well what that is, but I know that the submodule will be linked to s... | 23,123 | 246,776 | 2016-07-18 13:11:25 | 8,644,339 | 34 | 2011-12-27 11:55:21 | 6,309 | 2016-07-18 13:11:25 | https://stackoverflow.com/q/8642668 | https://stackoverflow.com/a/8644339 | <p>Update March 2013</p>
<p><a href="https://github.com/git/git/blob/master/Documentation/RelNotes/1.8.2.txt" rel="nofollow noreferrer">Git 1.8.2</a> added the possibility to track branches. </p>
<blockquote>
<p>"<code>git submodule</code>" started learning a new mode to <strong>integrate with the tip of the remote... | <p>Update March 2013</p> <p><a href="https://github.com/git/git/blob/master/Documentation/RelNotes/1.8.2.txt" rel="nofollow noreferrer">Git 1.8.2</a> added the possibility to track branches. </p> <blockquote> <p>"<code>git submodule</code>" started learning a new mode to <strong>integrate with the tip of the remote... | 119, 41612 | git, git-submodules | <h1>How to make submodule with detached HEAD to be attached to actual HEAD?</h1>
<p>When I add a Git submodule to a Git repository like this,</p>
<pre><code>git submodule add ssh://server/proj1/ proj1
git submodule init
git submodule update
</code></pre>
<p>the added submodule will be in <em>detached HEAD</em> mode. ... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 18,539 | git | # How to make submodule with detached HEAD to be attached to actual HEAD?
When I add a Git submodule to a Git repository like this,
```
git submodule add ssh://server/proj1/ proj1
git submodule init
git submodule update
```
the added submodule will be in *detached HEAD* mode. I don't know well what that is, but I kn... | Update March 2013
[Git 1.8.2](https://github.com/git/git/blob/master/Documentation/RelNotes/1.8.2.txt) added the possibility to track branches.
> "`git submodule`" started learning a new mode to **integrate with the tip of the remote branch** (as opposed to integrating with the commit recorded in the superproject's g... |
2670680 | Git basic workflow | 27 | 2010-04-19 20:36:21 | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="https://stackoverflow.com/questions/2816369/git-push-error-remote-rejected-master-master-branch-is-currently-checked">git push error '[remote rejected] master -> master (branch is currently checked out)'</a> </p>
</blockquote>
<p>I am ... | 22,995 | 303,477 | 2011-08-03 16:40:13 | 2,670,812 | 34 | 2010-04-19 20:56:05 | 102,447 | 2010-04-19 20:56:05 | https://stackoverflow.com/q/2670680 | https://stackoverflow.com/a/2670812 | <p>First of all, you do not need to clone your local repository. You can use branches to divide development in the same repository.</p>
<p>Git is a Distributed VCS, and if you have experience with Subversion or CVS before it, you need to change your mind.</p>
<p>Git is a very agile and you can use different workflows... | <p>First of all, you do not need to clone your local repository. You can use branches to divide development in the same repository.</p> <p>Git is a Distributed VCS, and if you have experience with Subversion or CVS before it, you need to change your mind.</p> <p>Git is a very agile and you can use different workflows... | 119, 4236 | git, push | <h1>Git basic workflow</h1>
<blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="https://stackoverflow.com/questions/2816369/git-push-error-remote-rejected-master-master-branch-is-currently-checked">git push error '[remote rejected] master -> master (branch is currently checked out)'</a> </... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 18,540 | git | # Git basic workflow
> **Possible Duplicate:**
> [git push error '[remote rejected] master -> master (branch is currently checked out)'](https://stackoverflow.com/questions/2816369/git-push-error-remote-rejected-master-master-branch-is-currently-checked)
I am new to Git and trying to use it for a local grails proje... | First of all, you do not need to clone your local repository. You can use branches to divide development in the same repository.
Git is a Distributed VCS, and if you have experience with Subversion or CVS before it, you need to change your mind.
Git is a very agile and you can use different workflows with it. Cloning... |
24879041 | how to use regex in git checkout command to specify file subsets | 26 | 2014-07-22 04:39:47 | <p>Say I am trying to checkout a certain set of git file, e.g. <code>app/*^(.tmpl).html</code>, </p>
<p>how to throw this regex into <code>git checkout branch -- (regex)</code></p>
| 18,618 | 2,167,582 | 2022-01-15 21:11:33 | 24,880,000 | 34 | 2014-07-22 06:01:58 | 6,309 | 2022-01-15 20:49:15 | https://stackoverflow.com/q/24879041 | https://stackoverflow.com/a/24880000 | <p>As mentioned in "<a href="https://stackoverflow.com/a/15161521/6309">Is there a way to use wildcards with <code>git checkout</code>?</a>"</p>
<blockquote>
<p>Git does not deal with the wildcard, but your shell does.</p>
</blockquote>
<p>As <a href="https://stackoverflow.com/a/29931855/6309">noted below</a>... | <p>As mentioned in "<a href="https://stackoverflow.com/a/15161521/6309">Is there a way to use wildcards with <code>git checkout</code>?</a>"</p> <blockquote> <p>Git does not deal with the wildcard, but your shell does.</p> </blockquote> <p>As <a href="https://stackoverflow.com/a/29931855/6309">noted below</a>... | 18, 119 | git, regex | <h1>how to use regex in git checkout command to specify file subsets</h1>
<p>Say I am trying to checkout a certain set of git file, e.g. <code>app/*^(.tmpl).html</code>, </p>
<p>how to throw this regex into <code>git checkout branch -- (regex)</code></p>
| q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 18,542 | git | # how to use regex in git checkout command to specify file subsets
Say I am trying to checkout a certain set of git file, e.g. `app/*^(.tmpl).html`,
how to throw this regex into `git checkout branch -- (regex)` | As mentioned in "[Is there a way to use wildcards with `git checkout`?](https://stackoverflow.com/a/15161521/6309)"
> Git does not deal with the wildcard, but your shell does.
As [noted below](https://stackoverflow.com/a/29931855/6309), you would need to escape the wildcard character in order for git to interpret it:... |
11870884 | vim says "No mouse support", but only when I run git commit | 26 | 2012-08-08 18:31:54 | <p>I like using the mouse with vim, so I have mouse support enabled in my <code>.vimrc</code>. This works just fine most everywhere, but whenever I run <code>git commit</code> on a specific server (Appa), I get an error message:</p>
<pre><code>[tswett@appa git]$ git commit
Error detected while processing /home/tswett/... | 5,137 | 1,108,505 | 2012-08-08 18:49:03 | 11,871,150 | 34 | 2012-08-08 18:49:03 | 147,356 | 2012-08-08 18:49:03 | https://stackoverflow.com/q/11870884 | https://stackoverflow.com/a/11871150 | <p>Does <code>vim</code> on Appa otherwise behave correctly? That is, do you have the problem <em>whenever</em> you run <code>vim</code>, or <em>only</em> when using <code>git commit</code>?</p>
<p>If the former:</p>
<p>Are you sure that <code>git commit</code> is running <code>vim</code>? Many applications default... | <p>Does <code>vim</code> on Appa otherwise behave correctly? That is, do you have the problem <em>whenever</em> you run <code>vim</code>, or <em>only</em> when using <code>git commit</code>?</p> <p>If the former:</p> <p>Are you sure that <code>git commit</code> is running <code>vim</code>? Many applications default... | 119, 370 | git, vim | <h1>vim says "No mouse support", but only when I run git commit</h1>
<p>I like using the mouse with vim, so I have mouse support enabled in my <code>.vimrc</code>. This works just fine most everywhere, but whenever I run <code>git commit</code> on a specific server (Appa), I get an error message:</p>
<pre><code>[tswet... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 18,543 | git | # vim says "No mouse support", but only when I run git commit
I like using the mouse with vim, so I have mouse support enabled in my `.vimrc`. This works just fine most everywhere, but whenever I run `git commit` on a specific server (Appa), I get an error message:
```
[tswett@appa git]$ git commit
Error detected whi... | Does `vim` on Appa otherwise behave correctly? That is, do you have the problem *whenever* you run `vim`, or *only* when using `git commit`?
If the former:
Are you sure that `git commit` is running `vim`? Many applications default to using `vi` in the absence of any other configuration, and it's typical for `vi` to e... |
6210272 | How does a Git repository works with a develop and master branch? | 26 | 2011-06-02 04:13:04 | <p>I'm new to Git and this is really confusing. I wanted to start off developing a web application on Git and so far I've been dealing with troubles that have kept me behind.</p>
<p>I've read <a href="http://nvie.com/posts/a-successful-git-branching-model/">this blog</a> post on a successful branching model for Git. I... | 32,060 | 409,153 | 2011-06-02 04:26:21 | 6,210,318 | 34 | 2011-06-02 04:20:30 | 240,443 | 2011-06-02 04:26:21 | https://stackoverflow.com/q/6210272 | https://stackoverflow.com/a/6210318 | <p>A branch is not a directory. It is a commit label that moves along with commits, like tag is a commit label that stays with a particular commit. You will not have anything "inside" the <code>master</code> branch, rather <code>master</code> and <code>develop</code> will both initially label the same commit.</p>
<p>C... | <p>A branch is not a directory. It is a commit label that moves along with commits, like tag is a commit label that stays with a particular commit. You will not have anything "inside" the <code>master</code> branch, rather <code>master</code> and <code>develop</code> will both initially label the same commit.</p> <p>C... | 119 | git | <h1>How does a Git repository works with a develop and master branch?</h1>
<p>I'm new to Git and this is really confusing. I wanted to start off developing a web application on Git and so far I've been dealing with troubles that have kept me behind.</p>
<p>I've read <a href="http://nvie.com/posts/a-successful-git-bran... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 18,544 | git | # How does a Git repository works with a develop and master branch?
I'm new to Git and this is really confusing. I wanted to start off developing a web application on Git and so far I've been dealing with troubles that have kept me behind.
I've read [this blog](http://nvie.com/posts/a-successful-git-branching-model/)... | A branch is not a directory. It is a commit label that moves along with commits, like tag is a commit label that stays with a particular commit. You will not have anything "inside" the `master` branch, rather `master` and `develop` will both initially label the same commit.
Create the develop branch like so:
```
git ... |
26617838 | How to resolve git submodule conflict if submodule is not initialized | 25 | 2014-10-28 20:25:11 | <p>I have two branches <code>A</code> and <code>B</code>. Both contain a submodule (in the folder <code>sub</code>), however at different commits (which do not fast-forward from one to another).</p>
<pre><code>A B
| /
BASE
</code></pre>
<p>I've checked out <code>A</code>, but the submodule isn't initialized yet. Now... | 21,613 | 3,906,760 | 2015-07-14 15:34:11 | 31,411,086 | 34 | 2015-07-14 15:34:11 | 3,188,445 | 2015-07-14 15:34:11 | https://stackoverflow.com/q/26617838 | https://stackoverflow.com/a/31411086 | <p>What makes your situation kind of annoying is that git won't let you initialize an unmerged submodule, so the ordinary advice of just setting the submodule to the state you want within the submodule then running <code>git add</code> won't work. What you can do is to update the index directly, without going through ... | <p>What makes your situation kind of annoying is that git won't let you initialize an unmerged submodule, so the ordinary advice of just setting the submodule to the state you want within the submodule then running <code>git add</code> won't work. What you can do is to update the index directly, without going through ... | 119, 41612 | git, git-submodules | <h1>How to resolve git submodule conflict if submodule is not initialized</h1>
<p>I have two branches <code>A</code> and <code>B</code>. Both contain a submodule (in the folder <code>sub</code>), however at different commits (which do not fast-forward from one to another).</p>
<pre><code>A B
| /
BASE
</code></pre>
<... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 18,546 | git | # How to resolve git submodule conflict if submodule is not initialized
I have two branches `A` and `B`. Both contain a submodule (in the folder `sub`), however at different commits (which do not fast-forward from one to another).
```
A B
| /
BASE
```
I've checked out `A`, but the submodule isn't initialized yet. N... | What makes your situation kind of annoying is that git won't let you initialize an unmerged submodule, so the ordinary advice of just setting the submodule to the state you want within the submodule then running `git add` won't work. What you can do is to update the index directly, without going through the working tre... |
4330202 | git svn - <file> was not found in commit <hash> | 25 | 2010-12-01 23:27:26 | <p>In the middle of pulling down a (rather large) svn repo with git-svn, I encountered the following error message (generic info substituted for real info):</p>
<pre><code>Found possible branch point: svn://server/project/trunk/dir => svn://server/project/branches/branchname, <revision>
Initializing parent: r... | 9,306 | 208 | 2020-12-05 23:49:58 | 4,764,778 | 34 | 2011-01-21 23:06:08 | 479,989 | 2011-01-21 23:06:08 | https://stackoverflow.com/q/4330202 | https://stackoverflow.com/a/4764778 | <p>This probably means that you are receiving a new svn revision which modifies a file which (for some reason) does not exist in your git commit equivalent of the parent svn revision. One very easy way to cause this is to be inconsistent with <code>--ignore-paths</code> (originally there was no way to configure those ... | <p>This probably means that you are receiving a new svn revision which modifies a file which (for some reason) does not exist in your git commit equivalent of the parent svn revision. One very easy way to cause this is to be inconsistent with <code>--ignore-paths</code> (originally there was no way to configure those ... | 119, 6452 | git, git-svn | <h1>git svn - <file> was not found in commit <hash></h1>
<p>In the middle of pulling down a (rather large) svn repo with git-svn, I encountered the following error message (generic info substituted for real info):</p>
<pre><code>Found possible branch point: svn://server/project/trunk/dir => svn://server/project/bra... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 18,548 | git | # git svn - was not found in commit
In the middle of pulling down a (rather large) svn repo with git-svn, I encountered the following error message (generic info substituted for real info):
```
Found possible branch point: svn://server/project/trunk/dir => svn://server/project/branches/branchname, <revision>
Initiali... | This probably means that you are receiving a new svn revision which modifies a file which (for some reason) does not exist in your git commit equivalent of the parent svn revision. One very easy way to cause this is to be inconsistent with `--ignore-paths` (originally there was no way to configure those and they had to... |
46334975 | What is git status -uno in git | 24 | 2017-09-21 03:24:25 | <p>When I type <code>git status</code> There is message saying</p>
<pre><code>It took 2.39 seconds to enumerate untracked files. 'status -uno'
may speed it up, but you have to be careful not to forget to add
new files yourself (see 'git help status').
nothing to commit, working tree clean
</code></pre>
<p>I type <co... | 10,830 | 6,209,936 | 2017-09-21 03:39:41 | 46,335,093 | 34 | 2017-09-21 03:39:41 | 1,009,479 | 2017-09-21 03:39:41 | https://stackoverflow.com/q/46334975 | https://stackoverflow.com/a/46335093 | <p>Git is telling you that because you have many untracked files, the result of <code>git status</code> takes longer time than usual.</p>
<p>The fix is to use <code>git status -uno</code>. From <a href="https://git-scm.com/docs/git-status/1.8.1" rel="noreferrer">the manual</a>:</p>
<blockquote>
<pre><code>-u[<mode... | <p>Git is telling you that because you have many untracked files, the result of <code>git status</code> takes longer time than usual.</p> <p>The fix is to use <code>git status -uno</code>. From <a href="https://git-scm.com/docs/git-status/1.8.1" rel="noreferrer">the manual</a>:</p> <blockquote> <pre><code>-u[<mode... | 119 | git | <h1>What is git status -uno in git</h1>
<p>When I type <code>git status</code> There is message saying</p>
<pre><code>It took 2.39 seconds to enumerate untracked files. 'status -uno'
may speed it up, but you have to be careful not to forget to add
new files yourself (see 'git help status').
nothing to commit, working... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 18,549 | git | # What is git status -uno in git
When I type `git status` There is message saying
```
It took 2.39 seconds to enumerate untracked files. 'status -uno'
may speed it up, but you have to be careful not to forget to add
new files yourself (see 'git help status').
nothing to commit, working tree clean
```
I type `git hel... | Git is telling you that because you have many untracked files, the result of `git status` takes longer time than usual.
The fix is to use `git status -uno`. From [the manual](https://git-scm.com/docs/git-status/1.8.1):
> ```
> -u[<mode>]
> --untracked-files[=<mode>]
> ```
>
> Show untracked files.
>
> The mode parame... |
34287722 | git checkout master does not switch branch - repository broken? | 24 | 2015-12-15 11:12:20 | <p><strong>tl;dr</strong>: <code>git checkout master</code> does not switch to master branch, gives no error or any output at all and I have no clue why. Any other branch works fine.</p>
<p>I have a git repository that consists of the branches <code>development</code> and <code>master</code>. I do a fresh clone of the... | 23,258 | 2,217,962 | 2024-02-13 03:41:23 | 46,222,104 | 34 | 2017-09-14 14:46:07 | 864,538 | 2017-09-14 14:46:07 | https://stackoverflow.com/q/34287722 | https://stackoverflow.com/a/46222104 | <p>If your repo has a folder or file name the same as a branch name then you will need to: <code>git checkout xyz --</code> with the extra <code>--</code> at the end. It tells git to use a branch or commit instead of trying to use a folder/file name.</p>
<p>Found the answer on another stackoverflow post: <a href="http... | <p>If your repo has a folder or file name the same as a branch name then you will need to: <code>git checkout xyz --</code> with the extra <code>--</code> at the end. It tells git to use a branch or commit instead of trying to use a folder/file name.</p> <p>Found the answer on another stackoverflow post: <a href="http... | 119, 37230 | git, git-checkout | <h1>git checkout master does not switch branch - repository broken?</h1>
<p><strong>tl;dr</strong>: <code>git checkout master</code> does not switch to master branch, gives no error or any output at all and I have no clue why. Any other branch works fine.</p>
<p>I have a git repository that consists of the branches <c... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 18,550 | git | # git checkout master does not switch branch - repository broken?
**tl;dr**: `git checkout master` does not switch to master branch, gives no error or any output at all and I have no clue why. Any other branch works fine.
I have a git repository that consists of the branches `development` and `master`. I do a fresh c... | If your repo has a folder or file name the same as a branch name then you will need to: `git checkout xyz --` with the extra `--` at the end. It tells git to use a branch or commit instead of trying to use a folder/file name.
Found the answer on another stackoverflow post: [Git change branch when file of same name is ... |
29893665 | How to checkout a file in git based on a tag | 24 | 2015-04-27 10:50:26 | <p>I have a commit hash <code>abcx</code> and I have given it a tag <code>100</code>.
Now I want to checkout a file <code>example.pl</code> to that tag <code>100</code>. Is it possible in git?<br>
I can do <code>git checkout abcs example.pl</code>, but I directly want to <strong>checkout a file based on the tag</stron... | 26,075 | 2,559,838 | 2019-10-30 02:15:23 | 29,893,937 | 34 | 2015-04-27 11:02:26 | 2,194,336 | 2018-03-13 18:20:22 | https://stackoverflow.com/q/29893665 | https://stackoverflow.com/a/29893937 | <p>Because of how <a href="http://git-scm.com/book/en/v2/Git-Basics-Tagging" rel="noreferrer">tags work in Git</a>, they are basically just read only branches which you can treat as any branch in Git. You can address them as <code>tags/<tag></code>.</p>
<p>To checkout the entire state of the repository to the wo... | <p>Because of how <a href="http://git-scm.com/book/en/v2/Git-Basics-Tagging" rel="noreferrer">tags work in Git</a>, they are basically just read only branches which you can treat as any branch in Git. You can address them as <code>tags/<tag></code>.</p> <p>To checkout the entire state of the repository to the wo... | 115, 119 | git, tags | <h1>How to checkout a file in git based on a tag</h1>
<p>I have a commit hash <code>abcx</code> and I have given it a tag <code>100</code>.
Now I want to checkout a file <code>example.pl</code> to that tag <code>100</code>. Is it possible in git?<br>
I can do <code>git checkout abcs example.pl</code>, but I directly w... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 18,551 | git | # How to checkout a file in git based on a tag
I have a commit hash `abcx` and I have given it a tag `100`.
Now I want to checkout a file `example.pl` to that tag `100`. Is it possible in git?
I can do `git checkout abcs example.pl`, but I directly want to **checkout a file based on the tag**.
Can anyone help me wi... | Because of how [tags work in Git](http://git-scm.com/book/en/v2/Git-Basics-Tagging), they are basically just read only branches which you can treat as any branch in Git. You can address them as `tags/<tag>`.
To checkout the entire state of the repository to the working directory with a tag, you write:
```
git checkou... |
19707993 | Git - find commit when file was created | 24 | 2013-10-31 13:35:39 | <p>What is the easiest way to determine in which <strong>commit</strong> a particular file was <strong>added</strong> to the repo?</p>
| 9,904 | 1,849,828 | 2020-01-19 13:31:44 | 19,708,217 | 34 | 2013-10-31 13:45:23 | 2,859,666 | 2013-10-31 13:45:23 | https://stackoverflow.com/q/19707993 | https://stackoverflow.com/a/19708217 | <p>It is easy. following command shows first commit that file was added to the repo.</p>
<pre><code>git log --oneline filename | tail -1
</code></pre>
| <p>It is easy. following command shows first commit that file was added to the repo.</p> <pre><code>git log --oneline filename | tail -1 </code></pre> | 119 | git | <h1>Git - find commit when file was created</h1>
<p>What is the easiest way to determine in which <strong>commit</strong> a particular file was <strong>added</strong> to the repo?</p>
| q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 18,553 | git | # Git - find commit when file was created
What is the easiest way to determine in which **commit** a particular file was **added** to the repo? | It is easy. following command shows first commit that file was added to the repo.
```
git log --oneline filename | tail -1
``` |
17293938 | Prevent commits in a local branch | 24 | 2013-06-25 09:40:33 | <p>In my local git tree I pull commits from the "master" branch in the repository, but all development is done in a different branch, and pushed in a different branch too.</p>
<p>I would like to avoid mistakes and prevent accidental commits in my local "master" branch, and allow only pull requests (then I'd rebase the... | 4,526 | 1,538,701 | 2016-06-08 17:26:18 | 17,293,994 | 34 | 2013-06-25 09:43:07 | 140,264 | 2016-06-08 17:26:18 | https://stackoverflow.com/q/17293938 | https://stackoverflow.com/a/17293994 | <p>You can use a <a href="http://git-scm.com/book/en/Customizing-Git-Git-Hooks"><strong>pre-commit hook</strong></a>.</p>
<p>For example, place the following script as <code>.git/hooks/pre-commit</code>:</p>
<pre><code>#!/bin/bash
if test $(git rev-parse --abbrev-ref HEAD) = "master" ; then
echo "Cannot commit on ... | <p>You can use a <a href="http://git-scm.com/book/en/Customizing-Git-Git-Hooks"><strong>pre-commit hook</strong></a>.</p> <p>For example, place the following script as <code>.git/hooks/pre-commit</code>:</p> <pre><code>#!/bin/bash if test $(git rev-parse --abbrev-ref HEAD) = "master" ; then echo "Cannot commit on ... | 119, 456, 3346 | dvcs, git, version-control | <h1>Prevent commits in a local branch</h1>
<p>In my local git tree I pull commits from the "master" branch in the repository, but all development is done in a different branch, and pushed in a different branch too.</p>
<p>I would like to avoid mistakes and prevent accidental commits in my local "master" branch, and al... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 18,554 | git | # Prevent commits in a local branch
In my local git tree I pull commits from the "master" branch in the repository, but all development is done in a different branch, and pushed in a different branch too.
I would like to avoid mistakes and prevent accidental commits in my local "master" branch, and allow only pull re... | You can use a [**pre-commit hook**](http://git-scm.com/book/en/Customizing-Git-Git-Hooks).
For example, place the following script as `.git/hooks/pre-commit`:
```
#!/bin/bash
if test $(git rev-parse --abbrev-ref HEAD) = "master" ; then
echo "Cannot commit on master"
exit 1
fi
```
And set it as executable
```
c... |
8947140 | git.cmd vs git.exe - what is the difference and which one should be used? | 24 | 2012-01-20 19:57:47 | <p>I have a rough idea that git.cmd is only a wrapper (but added to PATH by default), but I found out that git.exe works as well and I intend to use it as a workaround to this <a href="http://code.google.com/p/msysgit/issues/detail?id=358" rel="nofollow noreferrer">issue</a> (comments to it rather, regarding chcp on XP... | 24,367 | 663,028 | 2015-12-10 14:56:41 | 14,452,151 | 34 | 2013-01-22 05:31:56 | 159,607 | 2013-01-22 05:31:56 | https://stackoverflow.com/q/8947140 | https://stackoverflow.com/a/14452151 | <p><code>git.cmd</code> no longer exists in current versions of msysgit (e.g. 1.8.0). <code>git.cmd</code> was a wrapper that has been replaced by a new wrapped called <code>git.exe</code>. This is not to be confused with the actual <code>git.exe</code>.</p>
<p>If you take a look at the Git directory in <code>%Program... | <p><code>git.cmd</code> no longer exists in current versions of msysgit (e.g. 1.8.0). <code>git.cmd</code> was a wrapper that has been replaced by a new wrapped called <code>git.exe</code>. This is not to be confused with the actual <code>git.exe</code>.</p> <p>If you take a look at the Git directory in <code>%Program... | 64, 119, 2216, 21628 | git, msysgit, windows, windows-xp | <h1>git.cmd vs git.exe - what is the difference and which one should be used?</h1>
<p>I have a rough idea that git.cmd is only a wrapper (but added to PATH by default), but I found out that git.exe works as well and I intend to use it as a workaround to this <a href="http://code.google.com/p/msysgit/issues/detail?id=35... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 18,555 | git | # git.cmd vs git.exe - what is the difference and which one should be used?
I have a rough idea that git.cmd is only a wrapper (but added to PATH by default), but I found out that git.exe works as well and I intend to use it as a workaround to this [issue](http://code.google.com/p/msysgit/issues/detail?id=358) (commen... | `git.cmd` no longer exists in current versions of msysgit (e.g. 1.8.0). `git.cmd` was a wrapper that has been replaced by a new wrapped called `git.exe`. This is not to be confused with the actual `git.exe`.
If you take a look at the Git directory in `%ProgramFiles(x86)%` or `%ProgramFiles%`, you will see the followin... |
1583904 | What are git's thin packs? | 24 | 2009-10-18 03:23:07 | <p>I haven't found much on thin packs, and the man pages' information is rather cryptic about this. I know it has something to do with slow connections, but what would be a "slow connection"? </p>
<p>What are its pros and cons? When should I use it, when should I not use it?</p>
| 12,815 | 21,239 | 2019-03-07 09:09:35 | 1,584,190 | 34 | 2009-10-18 06:44:10 | 6,309 | 2019-03-07 09:09:35 | https://stackoverflow.com/q/1583904 | https://stackoverflow.com/a/1584190 | <p>For the record, the <a href="https://www.git-scm.com/docs/git-index-pack/1.5.5" rel="noreferrer">man page (<code>index-pack</code>)</a> states:</p>
<blockquote>
<p>It is possible for <a href="https://git-scm.com/docs/git-pack-objects/1.5.5" rel="noreferrer"><code>git-pack-objects</code></a> to build "thin" pack, ... | <p>For the record, the <a href="https://www.git-scm.com/docs/git-index-pack/1.5.5" rel="noreferrer">man page (<code>index-pack</code>)</a> states:</p> <blockquote> <p>It is possible for <a href="https://git-scm.com/docs/git-pack-objects/1.5.5" rel="noreferrer"><code>git-pack-objects</code></a> to build "thin" pack, ... | 119 | git | <h1>What are git's thin packs?</h1>
<p>I haven't found much on thin packs, and the man pages' information is rather cryptic about this. I know it has something to do with slow connections, but what would be a "slow connection"? </p>
<p>What are its pros and cons? When should I use it, when should I not use it?</p>
| q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 18,556 | git | # What are git's thin packs?
I haven't found much on thin packs, and the man pages' information is rather cryptic about this. I know it has something to do with slow connections, but what would be a "slow connection"?
What are its pros and cons? When should I use it, when should I not use it? | For the record, the [man page (`index-pack`)](https://www.git-scm.com/docs/git-index-pack/1.5.5) states:
> It is possible for [`git-pack-objects`](https://git-scm.com/docs/git-pack-objects/1.5.5) to build "thin" pack, which **records objects in deltified form based on objects not included in the pack to reduce network... |
1011985 | Line endings messed up in Git - how to track changes from another branch after a huge line ending fix? | 24 | 2009-06-18 10:37:45 | <p>We are working with a 3rd party PHP engine that gets regular updates. The releases are kept on a separate branch in git, and our fork is the master branch.</p>
<p>This way we'll be able to apply patches to our fork from the new releases of the engine.</p>
<p>My problem is, after many commits to our branch, I reali... | 16,951 | 125,013 | 2016-10-10 10:06:37 | 1,060,828 | 34 | 2009-06-29 22:08:31 | 125,013 | 2012-12-09 20:57:46 | https://stackoverflow.com/q/1011985 | https://stackoverflow.com/a/1060828 | <p>I finally managed to solve it.</p>
<p>The answer is:</p>
<pre><code>git filter-branch --tree-filter '~/Scripts/fix-line-endings.sh' -- --all
</code></pre>
<p>fix-line-endings.sh contains:</p>
<pre><code>#!/bin/sh
find . -type f -a \( -name '*.tpl' -o -name '*.php' -o -name '*.js' -o -name '*.css' -o -name '*.sh'... | <p>I finally managed to solve it.</p> <p>The answer is:</p> <pre><code>git filter-branch --tree-filter '~/Scripts/fix-line-endings.sh' -- --all </code></pre> <p>fix-line-endings.sh contains:</p> <pre><code>#!/bin/sh find . -type f -a \( -name '*.tpl' -o -name '*.php' -o -name '*.js' -o -name '*.css' -o -name '*.sh'... | 119, 1318, 1879, 3705, 7407 | branch, git, history, newline, url-rewriting | <h1>Line endings messed up in Git - how to track changes from another branch after a huge line ending fix?</h1>
<p>We are working with a 3rd party PHP engine that gets regular updates. The releases are kept on a separate branch in git, and our fork is the master branch.</p>
<p>This way we'll be able to apply patches t... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 18,557 | git | # Line endings messed up in Git - how to track changes from another branch after a huge line ending fix?
We are working with a 3rd party PHP engine that gets regular updates. The releases are kept on a separate branch in git, and our fork is the master branch.
This way we'll be able to apply patches to our fork from ... | I finally managed to solve it.
The answer is:
```
git filter-branch --tree-filter '~/Scripts/fix-line-endings.sh' -- --all
```
fix-line-endings.sh contains:
```
#!/bin/sh
find . -type f -a \( -name '*.tpl' -o -name '*.php' -o -name '*.js' -o -name '*.css' -o -name '*.sh' -o -name '*.txt' -iname '*.html' \) | xargs ... |
18277429 | Executing Git hooks on Windows | 23 | 2013-08-16 15:53:40 | <p>I'm having trouble executing Git hooks on Windows. I have a bare repo and in it's "hooks" folder I put the following into both the "update" and "pre-push" files but the PHP script is never being executed:</p>
<pre class="lang-none prettyprint-override"><code>"c:/Programs/PHP/php.exe" c:/Data/Scripts/git-pre-push.ph... | 62,994 | 2,404,541 | 2025-09-25 18:00:44 | 18,278,072 | 34 | 2013-08-16 16:31:03 | 720,999 | 2013-08-16 16:31:03 | https://stackoverflow.com/q/18277429 | https://stackoverflow.com/a/18278072 | <p>By default, Git for Windows executes hook scripts using its own Windows port of the <code>bash</code> shell. Certainly, a Unix shell has no idea about <code>%1</code>. Supposedly, Git for Windows has extra hacks in place to detect "common" filename extensions — such as <code>.bat</code> — and take an alt... | <p>By default, Git for Windows executes hook scripts using its own Windows port of the <code>bash</code> shell. Certainly, a Unix shell has no idea about <code>%1</code>. Supposedly, Git for Windows has extra hacks in place to detect "common" filename extensions — such as <code>.bat</code> — and take an alt... | 5, 64, 119, 853 | git, hook, php, windows | <h1>Executing Git hooks on Windows</h1>
<p>I'm having trouble executing Git hooks on Windows. I have a bare repo and in it's "hooks" folder I put the following into both the "update" and "pre-push" files but the PHP script is never being executed:</p>
<pre class="lang-none prettyprint-override"><code>"c:/Programs/PHP/... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 18,559 | git | # Executing Git hooks on Windows
I'm having trouble executing Git hooks on Windows. I have a bare repo and in it's "hooks" folder I put the following into both the "update" and "pre-push" files but the PHP script is never being executed:
```
"c:/Programs/PHP/php.exe" c:/Data/Scripts/git-pre-push.phpcli %1
```
Any id... | By default, Git for Windows executes hook scripts using its own Windows port of the `bash` shell. Certainly, a Unix shell has no idea about `%1`. Supposedly, Git for Windows has extra hacks in place to detect "common" filename extensions — such as `.bat` — and take an alternate route in such a case.
I think your fix t... |
7228715 | Git: failed to push some refs although I have done git pull | 23 | 2011-08-29 10:08:03 | <p>I started to get 'failed to push some refs' error when I changed some files and tried to do push. Most instructions tell to do git pull first. I have done it and git says everything is up to date. Any idea how to solve the error? I also started getting 'no version information available' message, I don't know does th... | 68,916 | 692,695 | 2017-10-28 16:51:22 | 7,228,868 | 34 | 2011-08-29 10:23:49 | 5,353 | 2011-08-29 10:23:49 | https://stackoverflow.com/q/7228715 | https://stackoverflow.com/a/7228868 | <p>The error is that somebody else has pushed in the <code>master</code> branch and you would overwrite their change if <code>git</code> allowed you to push (this is what <code>non-fast forward</code> error means). So you need to merge your local <code>master</code> branch with the remote <code>master</code> branch.</p... | <p>The error is that somebody else has pushed in the <code>master</code> branch and you would overwrite their change if <code>git</code> allowed you to push (this is what <code>non-fast forward</code> error means). So you need to merge your local <code>master</code> branch with the remote <code>master</code> branch.</p... | 119 | git | <h1>Git: failed to push some refs although I have done git pull</h1>
<p>I started to get 'failed to push some refs' error when I changed some files and tried to do push. Most instructions tell to do git pull first. I have done it and git says everything is up to date. Any idea how to solve the error? I also started get... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 18,560 | git | # Git: failed to push some refs although I have done git pull
I started to get 'failed to push some refs' error when I changed some files and tried to do push. Most instructions tell to do git pull first. I have done it and git says everything is up to date. Any idea how to solve the error? I also started getting 'no ... | The error is that somebody else has pushed in the `master` branch and you would overwrite their change if `git` allowed you to push (this is what `non-fast forward` error means). So you need to merge your local `master` branch with the remote `master` branch.
This can happen if you did the `git pull` while the local b... |
39451345 | Using credentials from Jenkins store in a jenkinsfile | 22 | 2016-09-12 13:20:46 | <p>I made a multibranch pipeline project in Jenkins. I need to use two repositories and both need credentials.</p>
<p>I created a Jenkinsfile in repository1:</p>
<pre><code>node ('label1'){
stage 'sanity check'
sh 'echo sanity check'
stage 'checkout other repository'
checkout([
$class: 'GitSCM', branche... | 104,906 | 5,106,596 | 2021-12-09 02:02:16 | 44,663,839 | 34 | 2017-06-20 22:12:02 | 8,191,023 | 2019-02-11 14:12:44 | https://stackoverflow.com/q/39451345 | https://stackoverflow.com/a/44663839 | <p>Your GitSCM class instantiation is incorrect. You have created two UserRemoteConfig objects - one with a URL of 'git@bitbucket.org:BRNTZN/repository2.git' and one with a credentialsId of 'jenkinsmaster'. Instead you want one object with both properties set.</p>
<pre><code>checkout([
$class: 'GitSCM', branches: [[... | <p>Your GitSCM class instantiation is incorrect. You have created two UserRemoteConfig objects - one with a URL of 'git@bitbucket.org:BRNTZN/repository2.git' and one with a credentialsId of 'jenkinsmaster'. Instead you want one object with both properties set.</p> <pre><code>checkout([ $class: 'GitSCM', branches: [[... | 119, 849, 64999, 118285 | git, groovy, jenkins, jenkins-pipeline | <h1>Using credentials from Jenkins store in a jenkinsfile</h1>
<p>I made a multibranch pipeline project in Jenkins. I need to use two repositories and both need credentials.</p>
<p>I created a Jenkinsfile in repository1:</p>
<pre><code>node ('label1'){
stage 'sanity check'
sh 'echo sanity check'
stage 'checkout... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 18,562 | git | # Using credentials from Jenkins store in a jenkinsfile
I made a multibranch pipeline project in Jenkins. I need to use two repositories and both need credentials.
I created a Jenkinsfile in repository1:
```
node ('label1'){
stage 'sanity check'
sh 'echo sanity check'
stage 'checkout other repository'
checko... | Your GitSCM class instantiation is incorrect. You have created two UserRemoteConfig objects - one with a URL of 'git@bitbucket.org:BRNTZN/repository2.git' and one with a credentialsId of 'jenkinsmaster'. Instead you want one object with both properties set.
```
checkout([
$class: 'GitSCM', branches: [[name: '*/maste... |
35658686 | Why git rebase doesn't show commits I want to squash? | 22 | 2016-02-26 18:04:26 | <p>I'm getting ready to initiate a pull request on a branch I'm working on. On github, I see that I'm 5 commits ahead of master, so I'd like to squash my commits into one. I run a git log to see what the previous commits are: </p>
<pre><code>git log --oneline
4363273 Updated Order_Entry with bulk UPDATE command
... | 21,650 | 1,925,859 | 2020-11-07 23:24:19 | 35,661,413 | 34 | 2016-02-26 20:46:04 | 1,256,452 | 2016-02-26 20:46:04 | https://stackoverflow.com/q/35658686 | https://stackoverflow.com/a/35661413 | <p>Your graph shows numerous merges. This is the source of the issue. It's worth noting here that <code>HEAD~5</code> means "five steps backwards following <code>--first-parent</code>".</p>
<hr>
<p>Let's cover a bit of background first. Generally speaking, you can't rebase a merge, and rebase usually doesn't try (... | <p>Your graph shows numerous merges. This is the source of the issue. It's worth noting here that <code>HEAD~5</code> means "five steps backwards following <code>--first-parent</code>".</p> <hr> <p>Let's cover a bit of background first. Generally speaking, you can't rebase a merge, and rebase usually doesn't try (... | 119 | git | <h1>Why git rebase doesn't show commits I want to squash?</h1>
<p>I'm getting ready to initiate a pull request on a branch I'm working on. On github, I see that I'm 5 commits ahead of master, so I'd like to squash my commits into one. I run a git log to see what the previous commits are: </p>
<pre><code>git log -... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 18,563 | git | # Why git rebase doesn't show commits I want to squash?
I'm getting ready to initiate a pull request on a branch I'm working on. On github, I see that I'm 5 commits ahead of master, so I'd like to squash my commits into one. I run a git log to see what the previous commits are:
```
git log --oneline
4363273 Updated ... | Your graph shows numerous merges. This is the source of the issue. It's worth noting here that `HEAD~5` means "five steps backwards following `--first-parent`".
---
Let's cover a bit of background first. Generally speaking, you can't rebase a merge, and rebase usually doesn't try (it usually just discards them). Usin... |
33400972 | Do a wildcard filter of branch names | 22 | 2015-10-28 20:26:18 | <p><code>git branch --all</code> lists lots of branches, and I am looking for one that includes the string <code>1234</code>, which is an issue number in our project management system.</p>
<p>The following works in PowerShell and I am wanting to replace it with something shell agnostic.</p>
<pre><code>PS> git bran... | 11,352 | 1,108,891 | 2015-10-28 20:33:31 | 33,401,085 | 34 | 2015-10-28 20:33:31 | 3,195,526 | 2015-10-28 20:33:31 | https://stackoverflow.com/q/33400972 | https://stackoverflow.com/a/33401085 | <p><code>git branch --list "*1234*"</code> does what you need. Or <code>git branch --list \*1234\*</code></p>
| <p><code>git branch --list "*1234*"</code> does what you need. Or <code>git branch --list \*1234\*</code></p> | 119 | git | <h1>Do a wildcard filter of branch names</h1>
<p><code>git branch --all</code> lists lots of branches, and I am looking for one that includes the string <code>1234</code>, which is an issue number in our project management system.</p>
<p>The following works in PowerShell and I am wanting to replace it with something s... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 18,564 | git | # Do a wildcard filter of branch names
`git branch --all` lists lots of branches, and I am looking for one that includes the string `1234`, which is an issue number in our project management system.
The following works in PowerShell and I am wanting to replace it with something shell agnostic.
```
PS> git branch --a... | `git branch --list "*1234*"` does what you need. Or `git branch --list \*1234\*` |
18112966 | Delete or remove all history, commits, and branches from a remote Git repo? | 22 | 2013-08-07 20:15:25 | <p>I've read and tried lots of Git command recommendations and discussion, going on over several days now. It appears that there really is no simple, comprehensive way to <strong>make a remote Git repo completely empty -- no branches, no refs, no objects, no files, no nothing</strong>.</p>
<p>Yes, <strong>I recognize... | 17,191 | 237,059 | 2015-08-04 10:45:41 | 18,113,182 | 34 | 2013-08-07 20:27:49 | null | 2014-07-22 07:11:25 | https://stackoverflow.com/q/18112966 | https://stackoverflow.com/a/18113182 | <p>You might want to try pushing an empty local repo with the <a href="https://www.kernel.org/pub/software/scm/git/docs/git-push.html"><code>--mirror</code> flag</a> (emphasis mine):</p>
<blockquote>
<pre><code>--mirror
</code></pre>
<p>Instead of naming each ref to push, specifies that all refs under refs/ (whic... | <p>You might want to try pushing an empty local repo with the <a href="https://www.kernel.org/pub/software/scm/git/docs/git-push.html"><code>--mirror</code> flag</a> (emphasis mine):</p> <blockquote> <pre><code>--mirror </code></pre> <p>Instead of naming each ref to push, specifies that all refs under refs/ (whic... | 119 | git | <h1>Delete or remove all history, commits, and branches from a remote Git repo?</h1>
<p>I've read and tried lots of Git command recommendations and discussion, going on over several days now. It appears that there really is no simple, comprehensive way to <strong>make a remote Git repo completely empty -- no branches,... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 18,566 | git | # Delete or remove all history, commits, and branches from a remote Git repo?
I've read and tried lots of Git command recommendations and discussion, going on over several days now. It appears that there really is no simple, comprehensive way to **make a remote Git repo completely empty -- no branches, no refs, no obj... | You might want to try pushing an empty local repo with the [`--mirror` flag](https://www.kernel.org/pub/software/scm/git/docs/git-push.html) (emphasis mine):
> ```
> --mirror
> ```
>
> Instead of naming each ref to push, specifies that all refs under refs/ (which includes but is not limited to `refs/heads/`, `refs/rem... |
9712234 | What's the difference between cloning and copying a git repo? | 22 | 2012-03-15 00:09:39 | <p>The <a href="https://stackoverflow.com/questions/2605017/difference-between-cloning-and-copying-in-mercurial">same question exists for mercurial</a>, and I'm wondering how this applies to git? In particular, I'm interested in cases where there are two local repos, and copying between servers using rsync or such.</p>... | 21,087 | 210,945 | 2019-01-16 18:51:31 | 9,712,253 | 34 | 2012-03-15 00:11:45 | 148,870 | 2012-03-24 02:38:04 | https://stackoverflow.com/q/9712234 | https://stackoverflow.com/a/9712253 | <p>Cloning a repository gives you a copy of that repository <em>and</em> configures the original repository as a remote.</p>
<p>Copying a repository just gives you a copy of that repository. (Though you can of course just add the remote definition afterwards via <code>git remote add</code>.)</p>
<hr>
<p>Copying a re... | <p>Cloning a repository gives you a copy of that repository <em>and</em> configures the original repository as a remote.</p> <p>Copying a repository just gives you a copy of that repository. (Though you can of course just add the remote definition afterwards via <code>git remote add</code>.)</p> <hr> <p>Copying a re... | 119, 1159, 4330, 34099 | copy, git, git-clone, rsync | <h1>What's the difference between cloning and copying a git repo?</h1>
<p>The <a href="https://stackoverflow.com/questions/2605017/difference-between-cloning-and-copying-in-mercurial">same question exists for mercurial</a>, and I'm wondering how this applies to git? In particular, I'm interested in cases where there ar... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 18,567 | git | # What's the difference between cloning and copying a git repo?
The [same question exists for mercurial](https://stackoverflow.com/questions/2605017/difference-between-cloning-and-copying-in-mercurial), and I'm wondering how this applies to git? In particular, I'm interested in cases where there are two local repos, a... | Cloning a repository gives you a copy of that repository *and* configures the original repository as a remote.
Copying a repository just gives you a copy of that repository. (Though you can of course just add the remote definition afterwards via `git remote add`.)
---
Copying a repository copies its `.git/config` fi... |
3631706 | What is this branch tracking (if anything) in git? | 22 | 2010-09-02 22:17:35 | <p>After creating a branch with --track (or leaving the default, or --notrack), you later wish to be reminded of what a branch is tracking. Is there a way, other than searching through the .git/config file, to display what a branch is tracking?</p>
| 17,873 | 331,858 | 2021-08-07 03:47:27 | 3,631,775 | 34 | 2010-09-02 22:28:45 | 167,735 | 2010-09-02 22:28:45 | https://stackoverflow.com/q/3631706 | https://stackoverflow.com/a/3631775 | <p>Use: <code>git branch -vv</code> to see which branches are tracked and which are not.</p>
| <p>Use: <code>git branch -vv</code> to see which branches are tracked and which are not.</p> | 119, 1879, 76220 | branch, git, git-branch | <h1>What is this branch tracking (if anything) in git?</h1>
<p>After creating a branch with --track (or leaving the default, or --notrack), you later wish to be reminded of what a branch is tracking. Is there a way, other than searching through the .git/config file, to display what a branch is tracking?</p>
| q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 18,568 | git | # What is this branch tracking (if anything) in git?
After creating a branch with --track (or leaving the default, or --notrack), you later wish to be reminded of what a branch is tracking. Is there a way, other than searching through the .git/config file, to display what a branch is tracking? | Use: `git branch -vv` to see which branches are tracked and which are not. |
47321486 | How to retrieve git pull history | 21 | 2017-11-16 04:13:17 | <p>Whenever I git pulled from remote repo into my local repo, did Git store the information of <strong>WHEN</strong> I pull? Can I see the log of pulls that I did in my local repo?</p>
| 29,017 | 1,516,958 | 2017-11-16 05:48:41 | 47,322,504 | 34 | 2017-11-16 05:48:41 | 6,309 | 2017-11-16 05:48:41 | https://stackoverflow.com/q/47321486 | https://stackoverflow.com/a/47322504 | <p>You can try and see the content of your <a href="https://git-scm.com/docs/git-reflog" rel="noreferrer"><code>git reflog</code></a>... but that will be limited in time (90 days by default)</p>
<pre><code>vonc@VONCAVN7 D:\git\git
> git reflog --date=iso|grep pull
3ec7d702a HEAD@{2017-09-10 17:42:57 +0200}: pull --... | <p>You can try and see the content of your <a href="https://git-scm.com/docs/git-reflog" rel="noreferrer"><code>git reflog</code></a>... but that will be limited in time (90 days by default)</p> <pre><code>vonc@VONCAVN7 D:\git\git > git reflog --date=iso|grep pull 3ec7d702a HEAD@{2017-09-10 17:42:57 +0200}: pull --... | 119 | git | <h1>How to retrieve git pull history</h1>
<p>Whenever I git pulled from remote repo into my local repo, did Git store the information of <strong>WHEN</strong> I pull? Can I see the log of pulls that I did in my local repo?</p>
| q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 18,571 | git | # How to retrieve git pull history
Whenever I git pulled from remote repo into my local repo, did Git store the information of **WHEN** I pull? Can I see the log of pulls that I did in my local repo? | You can try and see the content of your [`git reflog`](https://git-scm.com/docs/git-reflog)... but that will be limited in time (90 days by default)
```
vonc@VONCAVN7 D:\git\git
> git reflog --date=iso|grep pull
3ec7d702a HEAD@{2017-09-10 17:42:57 +0200}: pull --no-commit origin master: Fast-forward
b3622a4ee HEAD@{20... |
27240428 | git svn migration failing with svn 1.8 | 21 | 2014-12-02 01:31:43 | <p>I'm following the steps in:
<a href="http://git-scm.com/book/en/v2/Git-and-Other-Systems-Git-as-a-Client" rel="noreferrer">http://git-scm.com/book/en/v2/Git-and-Other-Systems-Git-as-a-Client</a></p>
<p>to move an svn repository to git. My local svn version is:</p>
<p><code>$ svn --version
svn, version 1.8.10 (r161... | 13,233 | 457,935 | 2018-11-25 10:10:28 | 27,325,713 | 34 | 2014-12-05 22:28:45 | 457,935 | 2018-11-25 10:10:28 | https://stackoverflow.com/q/27240428 | https://stackoverflow.com/a/27325713 | <p>I got an answer on the git-users email list. </p>
<p>The solution is to run a local svnserver and use the <code>svn</code> protocol when running <code>git svn clone</code> instead of the <code>file</code> protocol. That avoids <code>git-svn</code> needing to parse the svn 1.8 file format.</p>
<p>Suppose your repos... | <p>I got an answer on the git-users email list. </p> <p>The solution is to run a local svnserver and use the <code>svn</code> protocol when running <code>git svn clone</code> instead of the <code>file</code> protocol. That avoids <code>git-svn</code> needing to parse the svn 1.8 file format.</p> <p>Suppose your repos... | 63, 119, 456, 71219 | git, osx-lion, svn, version-control | <h1>git svn migration failing with svn 1.8</h1>
<p>I'm following the steps in:
<a href="http://git-scm.com/book/en/v2/Git-and-Other-Systems-Git-as-a-Client" rel="noreferrer">http://git-scm.com/book/en/v2/Git-and-Other-Systems-Git-as-a-Client</a></p>
<p>to move an svn repository to git. My local svn version is:</p>
<p... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 18,572 | git | # git svn migration failing with svn 1.8
I'm following the steps in:
<http://git-scm.com/book/en/v2/Git-and-Other-Systems-Git-as-a-Client>
to move an svn repository to git. My local svn version is:
`$ svn --version
svn, version 1.8.10 (r1615264)
compiled Aug 25 2014, 10:52:18 on x86_64-apple-darwin12.5.0`
git versi... | I got an answer on the git-users email list.
The solution is to run a local svnserver and use the `svn` protocol when running `git svn clone` instead of the `file` protocol. That avoids `git-svn` needing to parse the svn 1.8 file format.
Suppose your repository is in a directory `/path/to/repository/test-svn`. Change... |
15761890 | Git add only all new files, not modified files | 21 | 2013-04-02 10:33:32 | <p>Is there a way to only add new files and not add modified files with git? That is, files that are listed as untracked with git status.</p>
<p>Other than ofcourse adding each file separately.</p>
<p>It's not absolutely necessary to do this in my case, the real question for me is answered here: <a href="https://stac... | 14,316 | 1,053,561 | 2013-04-02 10:55:03 | 15,761,947 | 34 | 2013-04-02 10:36:49 | 636,626 | 2013-04-02 10:43:02 | https://stackoverflow.com/q/15761890 | https://stackoverflow.com/a/15761947 | <p>Maybe</p>
<pre><code>git add $(git ls-files -o --exclude-standard)
</code></pre>
<p><code>git ls-files</code> lets you list the files managed by git, filtered by some options. <code>-o</code> in this case filters it to only show "others (i.e. untracked files)"</p>
<p>The <code>$(...)</code> statement passes the r... | <p>Maybe</p> <pre><code>git add $(git ls-files -o --exclude-standard) </code></pre> <p><code>git ls-files</code> lets you list the files managed by git, filtered by some options. <code>-o</code> in this case filters it to only show "others (i.e. untracked files)"</p> <p>The <code>$(...)</code> statement passes the r... | 119, 34792 | git, git-add | <h1>Git add only all new files, not modified files</h1>
<p>Is there a way to only add new files and not add modified files with git? That is, files that are listed as untracked with git status.</p>
<p>Other than ofcourse adding each file separately.</p>
<p>It's not absolutely necessary to do this in my case, the real... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 18,573 | git | # Git add only all new files, not modified files
Is there a way to only add new files and not add modified files with git? That is, files that are listed as untracked with git status.
Other than ofcourse adding each file separately.
It's not absolutely necessary to do this in my case, the real question for me is ans... | Maybe
```
git add $(git ls-files -o --exclude-standard)
```
`git ls-files` lets you list the files managed by git, filtered by some options. `-o` in this case filters it to only show "others (i.e. untracked files)"
The `$(...)` statement passes the return value of that command as an argument to `git add`. |
2601745 | How to convert Vector Layer coordinates into Map Latitude and Longitude in Openlayers | 21 | 2010-04-08 16:37:41 | <p>I'm pretty confused. I have a point:</p>
<pre><code>x= -12669114.702301
y= 5561132.6760608
</code></pre>
<p>That I got from drawing a square on a vector layer with the DrawFeature controller. </p>
<p>The numbers seem...erm...awfull large, but they seem to work, because if I later draw a square with all the same p... | 30,807 | 99,502 | 2010-11-18 20:14:53 | 2,607,145 | 34 | 2010-04-09 11:58:03 | 235,993 | 2010-04-09 11:58:03 | https://stackoverflow.com/q/2601745 | https://stackoverflow.com/a/2607145 | <p>According to your code, the projection you are using is EPSG:900913, which is the one that Google uses. The units for this projection are meters, and the values that you obtain for the point are perfectly correct:</p>
<pre><code>x= -12669114.702301 (longitude)
y= 5561132.6760608 (latitude)
</code></pre>
<p>This va... | <p>According to your code, the projection you are using is EPSG:900913, which is the one that Google uses. The units for this projection are meters, and the values that you obtain for the point are perfectly correct:</p> <pre><code>x= -12669114.702301 (longitude) y= 5561132.6760608 (latitude) </code></pre> <p>This va... | 20301, 24658, 63416 | latitude-longitude, openlayers, proj4js | <h1>How to convert Vector Layer coordinates into Map Latitude and Longitude in Openlayers</h1>
<p>I'm pretty confused. I have a point:</p>
<pre><code>x= -12669114.702301
y= 5561132.6760608
</code></pre>
<p>That I got from drawing a square on a vector layer with the DrawFeature controller. </p>
<p>The numbers seem...... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 18,574 | git | # How to convert Vector Layer coordinates into Map Latitude and Longitude in Openlayers
I'm pretty confused. I have a point:
```
x= -12669114.702301
y= 5561132.6760608
```
That I got from drawing a square on a vector layer with the DrawFeature controller.
The numbers seem...erm...awfull large, but they seem to work... | According to your code, the projection you are using is EPSG:900913, which is the one that Google uses. The units for this projection are meters, and the values that you obtain for the point are perfectly correct:
```
x= -12669114.702301 (longitude)
y= 5561132.6760608 (latitude)
```
This values are not pixels but coo... |
48330402 | "Secret text" Git credentials not showing up in Jenkins project Source Code Management section | 20 | 2018-01-18 21:14:21 | <p>I am unable to see any <code>Secret text</code> credentials in the drop down in my Jenkins' project SCM section. I know that creating a <code>Secret text</code> credential from the drop down in SCM section is broken, but even if I create the credential by navigating to <code>Jenkins -> Credentials</code>, that cr... | 21,991 | 6,451,462 | 2018-03-30 09:39:03 | 49,571,986 | 34 | 2018-03-30 09:39:03 | 4,124,574 | 2018-03-30 09:39:03 | https://stackoverflow.com/q/48330402 | https://stackoverflow.com/a/49571986 | <p>You can't use the <code>Secret Text</code> credential for the SCM step because the Github Personal Access Token is only supposed to <strong>replace your password</strong>. Not your user <em>and</em> password. Meaning <strong>your user is still required</strong>. In the Github documentation <a href="https://help.gith... | <p>You can't use the <code>Secret Text</code> credential for the SCM step because the Github Personal Access Token is only supposed to <strong>replace your password</strong>. Not your user <em>and</em> password. Meaning <strong>your user is still required</strong>. In the Github documentation <a href="https://help.gith... | 119, 64999, 76768 | git, jenkins, jenkins-plugins | <h1>"Secret text" Git credentials not showing up in Jenkins project Source Code Management section</h1>
<p>I am unable to see any <code>Secret text</code> credentials in the drop down in my Jenkins' project SCM section. I know that creating a <code>Secret text</code> credential from the drop down in SCM section is brok... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 18,576 | git | # "Secret text" Git credentials not showing up in Jenkins project Source Code Management section
I am unable to see any `Secret text` credentials in the drop down in my Jenkins' project SCM section. I know that creating a `Secret text` credential from the drop down in SCM section is broken, but even if I create the cr... | You can't use the `Secret Text` credential for the SCM step because the Github Personal Access Token is only supposed to **replace your password**. Not your user *and* password. Meaning **your user is still required**. In the Github documentation [here](https://help.github.com/articles/creating-a-personal-access-token-... |
28146244 | What is the difference between diff and diff=astextplain? | 20 | 2015-01-26 07:42:11 | <p>Can someone help me. I am using Git (GitHub) and trying to decide what to set my <code>*.sql</code> files to in the gitattributes. I've seen people use</p>
<pre><code>*.sql diff=astextplain
*.sql diff
*.sql text=auto
</code></pre>
<p>I was advised to set this to the second option, but I am just wondering what is t... | 10,952 | 1,422,604 | 2025-10-31 07:57:32 | 28,148,416 | 34 | 2015-01-26 10:31:05 | 2,541,573 | 2025-10-31 07:57:32 | https://stackoverflow.com/q/28146244 | https://stackoverflow.com/a/28148416 | <h1>TL;DR</h1>
<ul>
<li><code>diff=astextplain</code> (<a href="https://gitforwindows.org/" rel="nofollow noreferrer">Git for Windows</a> only): converts those files (under the condition that their mime-type is supported) to a text format before generating their diff.</li>
<li><code>diff</code>: treat those files as pl... | <h1>TL;DR</h1> <ul> <li><code>diff=astextplain</code> (<a href="https://gitforwindows.org/" rel="nofollow noreferrer">Git for Windows</a> only): converts those files (under the condition that their mime-type is supported) to a text format before generating their diff.</li> <li><code>diff</code>: treat those files as pl... | 119, 56102 | git, gitattributes | <h1>What is the difference between diff and diff=astextplain?</h1>
<p>Can someone help me. I am using Git (GitHub) and trying to decide what to set my <code>*.sql</code> files to in the gitattributes. I've seen people use</p>
<pre><code>*.sql diff=astextplain
*.sql diff
*.sql text=auto
</code></pre>
<p>I was advised ... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 18,577 | git | # What is the difference between diff and diff=astextplain?
Can someone help me. I am using Git (GitHub) and trying to decide what to set my `*.sql` files to in the gitattributes. I've seen people use
```
*.sql diff=astextplain
*.sql diff
*.sql text=auto
```
I was advised to set this to the second option, but I am j... | # TL;DR
- `diff=astextplain` ([Git for Windows](https://gitforwindows.org/) only): converts those files (under the condition that their mime-type is supported) to a text format before generating their diff.
- `diff`: treat those files as plain text for generating their diff.
- `text=auto`: automatically normalize EOL ... |
24833198 | Git - Create a new remote branch out of an old commit | 20 | 2014-07-18 20:22:37 | <p>I'm using the following Git command in order to create a new remote branch:</p>
<pre><code>git push origin origin:refs/heads/new_branch_name
</code></pre>
<p>I wish that the new branch will start from an old commit,</p>
<p>How can I do that? (I've tried some different methods, though failed)</p>
<p>Thank you.</p... | 12,712 | 982,380 | 2020-02-03 16:51:52 | 24,833,267 | 34 | 2014-07-18 20:27:10 | 2,456,433 | 2014-07-18 20:27:10 | https://stackoverflow.com/q/24833198 | https://stackoverflow.com/a/24833267 | <pre><code>git checkout -b new_branch_name
git reset --hard <old_commit_id>
git push origin new_branch_name
</code></pre>
| <pre><code>git checkout -b new_branch_name git reset --hard <old_commit_id> git push origin new_branch_name </code></pre> | 119, 1879, 5597 | branch, commit, git | <h1>Git - Create a new remote branch out of an old commit</h1>
<p>I'm using the following Git command in order to create a new remote branch:</p>
<pre><code>git push origin origin:refs/heads/new_branch_name
</code></pre>
<p>I wish that the new branch will start from an old commit,</p>
<p>How can I do that? (I've tri... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 18,578 | git | # Git - Create a new remote branch out of an old commit
I'm using the following Git command in order to create a new remote branch:
```
git push origin origin:refs/heads/new_branch_name
```
I wish that the new branch will start from an old commit,
How can I do that? (I've tried some different methods, though failed... | ```
git checkout -b new_branch_name
git reset --hard <old_commit_id>
git push origin new_branch_name
``` |
11365317 | git-svn clone fails "fatal: Not a valid object name" | 20 | 2012-07-06 15:37:19 | <p>Whilst doing <code>git svn clone -s https://svn.example.com/repo/</code> I received the following output:</p>
<pre><code>r3073 = a6132f3a937b632015e66d694250da9f606b8333 (refs/remotes/trunk)
Found possible branch point: https://svn.example.com/repo/trunk => https://svn.example.com/repo/branches/v1.3, 3073
W: Ref... | 14,320 | 141,284 | 2020-12-08 10:58:11 | 11,365,319 | 34 | 2012-07-06 15:37:20 | 141,284 | 2017-03-02 14:01:51 | https://stackoverflow.com/q/11365317 | https://stackoverflow.com/a/11365319 | <p>The tag on SVN has a space in it, but the tag in git had this space converted to <code>%20</code> (URL encoded). To solve it just manually add a new tag with the verbatim name:</p>
<pre><code>cd .git/refs/remotes/tags/
mv Sync%20Controllers Sync\ Controllers
</code></pre>
<p>Then run the <code>git svn clone</code>... | <p>The tag on SVN has a space in it, but the tag in git had this space converted to <code>%20</code> (URL encoded). To solve it just manually add a new tag with the verbatim name:</p> <pre><code>cd .git/refs/remotes/tags/ mv Sync%20Controllers Sync\ Controllers </code></pre> <p>Then run the <code>git svn clone</code>... | 6452 | git-svn | <h1>git-svn clone fails "fatal: Not a valid object name"</h1>
<p>Whilst doing <code>git svn clone -s https://svn.example.com/repo/</code> I received the following output:</p>
<pre><code>r3073 = a6132f3a937b632015e66d694250da9f606b8333 (refs/remotes/trunk)
Found possible branch point: https://svn.example.com/repo/trunk... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 18,579 | git | # git-svn clone fails "fatal: Not a valid object name"
Whilst doing `git svn clone -s https://svn.example.com/repo/` I received the following output:
```
r3073 = a6132f3a937b632015e66d694250da9f606b8333 (refs/remotes/trunk)
Found possible branch point: https://svn.example.com/repo/trunk => https://svn.example.com/rep... | The tag on SVN has a space in it, but the tag in git had this space converted to `%20` (URL encoded). To solve it just manually add a new tag with the verbatim name:
```
cd .git/refs/remotes/tags/
mv Sync%20Controllers Sync\ Controllers
```
Then run the `git svn clone` command again.
*(Normally you'd do this with `g... |
850473 | Git: how is a branch I'm not committing to ahead of origin/master | 20 | 2009-05-11 23:05:42 | <p>I work 100% with a branch that I made off of the master branch. Now that a colleague has pushed back to origin/master, I tried to push those changes into my personal branch. When I do a 'git checkout master' followed by a 'git status' I get the following:</p>
<pre><code># Your branch is ahead of 'origin/master' by ... | 14,885 | null | 2012-07-20 19:43:05 | 850,509 | 34 | 2009-05-11 23:23:21 | 85,134 | 2009-05-11 23:23:21 | https://stackoverflow.com/q/850473 | https://stackoverflow.com/a/850509 | <p>To see the commits you have in HEAD that are not in origin/master:</p>
<pre><code>git log origin/master..
</code></pre>
<p>To blow them away and make your HEAD the same as origin/master:</p>
<pre><code>git reset --hard origin/master
</code></pre>
<p>How did you push the changes to your own repository? I notice y... | <p>To see the commits you have in HEAD that are not in origin/master:</p> <pre><code>git log origin/master.. </code></pre> <p>To blow them away and make your HEAD the same as origin/master:</p> <pre><code>git reset --hard origin/master </code></pre> <p>How did you push the changes to your own repository? I notice y... | 119, 456 | git, version-control | <h1>Git: how is a branch I'm not committing to ahead of origin/master</h1>
<p>I work 100% with a branch that I made off of the master branch. Now that a colleague has pushed back to origin/master, I tried to push those changes into my personal branch. When I do a 'git checkout master' followed by a 'git status' I get t... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 18,580 | git | # Git: how is a branch I'm not committing to ahead of origin/master
I work 100% with a branch that I made off of the master branch. Now that a colleague has pushed back to origin/master, I tried to push those changes into my personal branch. When I do a 'git checkout master' followed by a 'git status' I get the follow... | To see the commits you have in HEAD that are not in origin/master:
```
git log origin/master..
```
To blow them away and make your HEAD the same as origin/master:
```
git reset --hard origin/master
```
How did you push the changes to your own repository? I notice you mentioned "push"... Is origin a central repo? Yo... |
41956786 | List and delete git branches without cloning | 19 | 2017-01-31 11:47:24 | <pre><code>for k in $(git branch -r --merged origin/master | cut -d" " -f 3); do
echo $k
done
</code></pre>
<p>I have a list of git projects that i want to clean up old branches in, what i want to do is list and delete all the branches that are merged to master. </p>
<p>Is there a way to do the above without clon... | 16,106 | 7,431,936 | 2019-10-29 23:45:39 | 41,957,483 | 34 | 2017-01-31 12:21:36 | 720,999 | 2017-02-01 06:50:53 | https://stackoverflow.com/q/41956786 | https://stackoverflow.com/a/41957483 | <p>You need <code>git ls-remote</code>:</p>
<blockquote>
<p>NAME</p>
<p><code>git-ls-remote</code> - List references in a remote repository</p>
<p>SYNOPSIS</p>
<pre><code>git ls-remote [--heads] [--tags] [--refs] [--upload-pack=<exec>]
[-q | --quiet] [--exit-code] [--get-url]
... | <p>You need <code>git ls-remote</code>:</p> <blockquote> <p>NAME</p> <p><code>git-ls-remote</code> - List references in a remote repository</p> <p>SYNOPSIS</p> <pre><code>git ls-remote [--heads] [--tags] [--refs] [--upload-pack=<exec>] [-q | --quiet] [--exit-code] [--get-url] ... | 119, 1879 | branch, git | <h1>List and delete git branches without cloning</h1>
<pre><code>for k in $(git branch -r --merged origin/master | cut -d" " -f 3); do
echo $k
done
</code></pre>
<p>I have a list of git projects that i want to clean up old branches in, what i want to do is list and delete all the branches that are merged to master... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 18,583 | git | # List and delete git branches without cloning
```
for k in $(git branch -r --merged origin/master | cut -d" " -f 3); do
echo $k
done
```
I have a list of git projects that i want to clean up old branches in, what i want to do is list and delete all the branches that are merged to master.
Is there a way to do th... | You need `git ls-remote`:
> NAME
>
> `git-ls-remote` - List references in a remote repository
>
> SYNOPSIS
>
> ```
> git ls-remote [--heads] [--tags] [--refs] [--upload-pack=<exec>]
> [-q | --quiet] [--exit-code] [--get-url]
> [--symref] [<repository> [<refs>...]]
> ```
>
> DESCRIPTION
>
> ... |
41536479 | How do I split an integer into individual digits? | 19 | 2017-01-08 18:49:43 | <p>I'm writing a function that requires the individual digits of a larger integer to perform operations on. </p>
<p>I've tried the following:</p>
<pre><code>fn example(num: i32) {
// I can safely unwrap because I know the chars of the string are going to be valid
let digits = num.to_string().chars().map(|d| d... | 25,221 | 1,351,298 | 2019-12-15 14:50:04 | 41,536,521 | 34 | 2017-01-08 18:53:59 | 155,423 | 2019-12-15 14:50:04 | https://stackoverflow.com/q/41536479 | https://stackoverflow.com/a/41536521 | <blockquote>
<p>But the borrow checker says the string doesn't live long enough.</p>
</blockquote>
<p>That's because it <em>doesn't</em>. You aren't using the iterator, so the type of <code>digits</code> is</p>
<pre><code>std::iter::Map<std::str::Chars<'_>, <closure>>
</code></pre>
<p>That is, a ... | <blockquote> <p>But the borrow checker says the string doesn't live long enough.</p> </blockquote> <p>That's because it <em>doesn't</em>. You aren't using the iterator, so the type of <code>digits</code> is</p> <pre><code>std::iter::Map<std::str::Chars<'_>, <closure>> </code></pre> <p>That is, a ... | 9914, 59148 | digits, rust | <h1>How do I split an integer into individual digits?</h1>
<p>I'm writing a function that requires the individual digits of a larger integer to perform operations on. </p>
<p>I've tried the following:</p>
<pre><code>fn example(num: i32) {
// I can safely unwrap because I know the chars of the string are going to ... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 18,584 | git | # How do I split an integer into individual digits?
I'm writing a function that requires the individual digits of a larger integer to perform operations on.
I've tried the following:
```
fn example(num: i32) {
// I can safely unwrap because I know the chars of the string are going to be valid
let digits = nu... | > But the borrow checker says the string doesn't live long enough.
That's because it *doesn't*. You aren't using the iterator, so the type of `digits` is
```
std::iter::Map<std::str::Chars<'_>, <closure>>
```
That is, a yet-to-be-evaluated iterator that contains references to the allocated string (the unnamed lifeti... |
25948049 | 'git commit --amend' in detached HEAD state | 19 | 2014-09-20 11:01:30 | <p>I understand that the correct way of amending an old Git commit is to use <code>rebase --interactive</code>, but just to get clear on the concepts, I would like to understand what happens when I do</p>
<ul>
<li><code>git checkout <commit></code></li>
<li>change something in a file</li>
<li>add the changed file... | 5,386 | 349,169 | 2021-12-30 20:37:54 | 25,948,372 | 34 | 2014-09-20 11:41:56 | 2,541,573 | 2020-10-05 12:28:02 | https://stackoverflow.com/q/25948049 | https://stackoverflow.com/a/25948372 | <p>In Git, once a commit is created, it's set in stone; you cannot change it. All you can do—by amending it, cherry-picking it, etc.—is create a new commit that "resembles" it.</p>
<p>I understand your confusion: "amend" is a bit of a misnomer; it's somewhat misleading, as it suggests modifying some... | <p>In Git, once a commit is created, it's set in stone; you cannot change it. All you can do—by amending it, cherry-picking it, etc.—is create a new commit that "resembles" it.</p> <p>I understand your confusion: "amend" is a bit of a misnomer; it's somewhat misleading, as it suggests modifying some... | 119, 5597, 8974, 30968, 53850 | commit, git, git-amend, git-commit, rebase | <h1>'git commit --amend' in detached HEAD state</h1>
<p>I understand that the correct way of amending an old Git commit is to use <code>rebase --interactive</code>, but just to get clear on the concepts, I would like to understand what happens when I do</p>
<ul>
<li><code>git checkout <commit></code></li>
<li>cha... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 18,585 | git | # 'git commit --amend' in detached HEAD state
I understand that the correct way of amending an old Git commit is to use `rebase --interactive`, but just to get clear on the concepts, I would like to understand what happens when I do
- `git checkout <commit>`
- change something in a file
- add the changed file to the ... | In Git, once a commit is created, it's set in stone; you cannot change it. All you can do—by amending it, cherry-picking it, etc.—is create a new commit that "resembles" it.
I understand your confusion: "amend" is a bit of a misnomer; it's somewhat misleading, as it suggests modifying something in place. In Git, *amen... |
44714 | How to have two remote origins for Git? | 19 | 2008-09-04 20:36:15 | <p>Our git server will be local, but we want an server where our local repo is also kept online but only used in a <code>push</code> to fashion.</p>
<p>How can one do that?</p>
| 7,624 | 370,899 | 2021-10-09 14:16:37 | 44,738 | 34 | 2008-09-04 20:47:06 | 1,044 | 2008-09-04 20:47:06 | https://stackoverflow.com/q/44714 | https://stackoverflow.com/a/44738 | <p>You can add remotes with <code>git remote add <name> <url></code></p>
<p>You can then push to a remote with <code>git push <name> master:master</code> to push your local master branch to the remote master branch.</p>
<p>When you create a repo with <code>git clone</code> the remote is named <code... | <p>You can add remotes with <code>git remote add <name> <url></code></p> <p>You can then push to a remote with <code>git push <name> master:master</code> to push your local master branch to the remote master branch.</p> <p>When you create a repo with <code>git clone</code> the remote is named <code... | 119 | git | <h1>How to have two remote origins for Git?</h1>
<p>Our git server will be local, but we want an server where our local repo is also kept online but only used in a <code>push</code> to fashion.</p>
<p>How can one do that?</p>
| q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 18,587 | git | # How to have two remote origins for Git?
Our git server will be local, but we want an server where our local repo is also kept online but only used in a `push` to fashion.
How can one do that? | You can add remotes with `git remote add <name> <url>`
You can then push to a remote with `git push <name> master:master` to push your local master branch to the remote master branch.
When you create a repo with `git clone` the remote is named `origin` but you can create a `public` repository for your online server a... |
72038524 | What does the "+" , "*", "!" sign next to a branch name indicate in VS Code? | 18 | 2022-04-28 05:41:17 | <p>In VS Code there is a <strong>"+"</strong> sign next to my branch name. What does that mean?</p>
<p><a href="https://i.sstatic.net/f9lgw.png" rel="noreferrer"><img src="https://i.sstatic.net/f9lgw.png" alt="enter image description here" /></a></p>
| 9,581 | 14,598,871 | 2023-03-23 11:51:38 | 72,039,863 | 34 | 2022-04-28 07:46:32 | 1,119,550 | 2023-02-28 15:11:27 | https://stackoverflow.com/q/72038524 | https://stackoverflow.com/a/72039863 | <p>Checking the <a href="https://github.com/microsoft/vscode/blob/6e85d2b51ef005941279a762c541d93eaf0dc35e/extensions/git/src/repository.ts#L2299-L2301" rel="noreferrer">source code</a> reveals that:</p>
<ul>
<li><code>*</code> indicates you have unstaged changes (not been added yet)</li>
<li><code>+</code> indicates y... | <p>Checking the <a href="https://github.com/microsoft/vscode/blob/6e85d2b51ef005941279a762c541d93eaf0dc35e/extensions/git/src/repository.ts#L2299-L2301" rel="noreferrer">source code</a> reveals that:</p> <ul> <li><code>*</code> indicates you have unstaged changes (not been added yet)</li> <li><code>+</code> indicates y... | 76220, 111608 | git-branch, visual-studio-code | <h1>What does the "+" , "*", "!" sign next to a branch name indicate in VS Code?</h1>
<p>In VS Code there is a <strong>"+"</strong> sign next to my branch name. What does that mean?</p>
<p><a href="https://i.sstatic.net/f9lgw.png" rel="noreferrer"><img src="https://i.sstatic.net/f9lgw.png" alt="enter image de... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 18,588 | git | # What does the "+" , "*", "!" sign next to a branch name indicate in VS Code?
In VS Code there is a **"+"** sign next to my branch name. What does that mean?
[](https://i.sstatic.net/f9lgw.png) | Checking the [source code](https://github.com/microsoft/vscode/blob/6e85d2b51ef005941279a762c541d93eaf0dc35e/extensions/git/src/repository.ts#L2299-L2301) reveals that:
- `*` indicates you have unstaged changes (not been added yet)
- `+` indicates you have staged changes (added, but not commited)
- `!` indicates unmer... |
69246694 | How to tell git to show diff of changes I did in last commit? | 18 | 2021-09-19 20:02:05 | <p>With <code>git</code>, how do I see the changes in my last commit?</p>
<p>I mean I want to see a diff between my last commit and the commit previous to it. I know that I can see it on Github browser but I want to see this on terminal on my local commit history.</p>
<p>I know that I can do git diff between commits. S... | 13,345 | 6,626,554 | 2021-09-19 20:12:23 | 69,246,762 | 34 | 2021-09-19 20:12:23 | 157,957 | 2021-09-19 20:12:23 | https://stackoverflow.com/q/69246694 | https://stackoverflow.com/a/69246762 | <p>There are a few ways to see that, but the simplest is probably just:</p>
<pre><code>git show
</code></pre>
<p>The <a href="https://git-scm.com/docs/git-show" rel="noreferrer">git show</a> command displays a formatted version of an object it git's database. Without any arguments, it shows <code>HEAD</code> - the curr... | <p>There are a few ways to see that, but the simplest is probably just:</p> <pre><code>git show </code></pre> <p>The <a href="https://git-scm.com/docs/git-show" rel="noreferrer">git show</a> command displays a formatted version of an object it git's database. Without any arguments, it shows <code>HEAD</code> - the curr... | 119, 9033 | git, git-diff | <h1>How to tell git to show diff of changes I did in last commit?</h1>
<p>With <code>git</code>, how do I see the changes in my last commit?</p>
<p>I mean I want to see a diff between my last commit and the commit previous to it. I know that I can see it on Github browser but I want to see this on terminal on my local ... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 18,589 | git | # How to tell git to show diff of changes I did in last commit?
With `git`, how do I see the changes in my last commit?
I mean I want to see a diff between my last commit and the commit previous to it. I know that I can see it on Github browser but I want to see this on terminal on my local commit history.
I know th... | There are a few ways to see that, but the simplest is probably just:
```
git show
```
The [git show](https://git-scm.com/docs/git-show) command displays a formatted version of an object it git's database. Without any arguments, it shows `HEAD` - the currently checked out commit.
For a commit, its default output is t... |
50135844 | What does git do when we do : git gc - git prune | 18 | 2018-05-02 13:27:22 | <p>What's going on in background when launching, </p>
<ul>
<li><code>git gc</code> </li>
<li><code>git prune</code></li>
</ul>
<p>Output of <strong>git gc</strong> :</p>
<pre><code>Counting objects: 945490, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (334718/334718), done.
Writin... | 14,258 | 9,317,830 | 2024-02-18 18:26:38 | 50,141,014 | 34 | 2018-05-02 18:11:20 | 1,256,452 | 2018-08-30 17:21:57 | https://stackoverflow.com/q/50135844 | https://stackoverflow.com/a/50141014 | <h3>TL;DR</h3>
<p><code>git prune</code> only removes <em>loose, unreachable, stale</em> objects (objects must have all three properties to get pruned). Unreachable packed objects remain in their pack files. Reachable loose objects remain reachable and loose. Objects that are unreachable, but are not yet stale, als... | <h3>TL;DR</h3> <p><code>git prune</code> only removes <em>loose, unreachable, stale</em> objects (objects must have all three properties to get pruned). Unreachable packed objects remain in their pack files. Reachable loose objects remain reachable and loose. Objects that are unreachable, but are not yet stale, als... | 119, 1850, 44929 | garbage-collection, git, git-gc | <h1>What does git do when we do : git gc - git prune</h1>
<p>What's going on in background when launching, </p>
<ul>
<li><code>git gc</code> </li>
<li><code>git prune</code></li>
</ul>
<p>Output of <strong>git gc</strong> :</p>
<pre><code>Counting objects: 945490, done.
Delta compression using up to 4 threads. ... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 18,591 | git | # What does git do when we do : git gc - git prune
What's going on in background when launching,
- `git gc`
- `git prune`
Output of **git gc** :
```
Counting objects: 945490, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (334718/334718), done.
Writing objects: 100% (945490/945490),... | ### TL;DR
`git prune` only removes *loose, unreachable, stale* objects (objects must have all three properties to get pruned). Unreachable packed objects remain in their pack files. Reachable loose objects remain reachable and loose. Objects that are unreachable, but are not yet stale, also remain untouched. The defin... |
9151920 | Git: Rename or move all files at once | 18 | 2012-02-05 18:43:16 | <p>I want to rename all erb files in my Git project to haml.(like index.html.erb to index.html.haml)</p>
<p>If I rename each file, I have to type the following command more than thirty times.</p>
<pre><code>$ git mv app/views/pages/index.html.erb app/views/pages/index.html.haml
</code></pre>
<p>I tried the command b... | 11,683 | 1,058,763 | 2020-06-11 09:17:55 | 9,151,943 | 34 | 2012-02-05 18:46:09 | 383,402 | 2012-02-05 18:55:17 | https://stackoverflow.com/q/9151920 | https://stackoverflow.com/a/9151943 | <pre><code>for i in $(find . -iname "*.erb"); do
git mv "$i" "$(echo $i | rev | cut -d '.' -f 2- | rev).haml";
done
</code></pre>
<p>For each .erb file, <code>git mv</code> it to itself with the extension ".erb" replaced by ".haml".</p>
| <pre><code>for i in $(find . -iname "*.erb"); do git mv "$i" "$(echo $i | rev | cut -d '.' -f 2- | rev).haml"; done </code></pre> <p>For each .erb file, <code>git mv</code> it to itself with the extension ".erb" replaced by ".haml".</p> | 119 | git | <h1>Git: Rename or move all files at once</h1>
<p>I want to rename all erb files in my Git project to haml.(like index.html.erb to index.html.haml)</p>
<p>If I rename each file, I have to type the following command more than thirty times.</p>
<pre><code>$ git mv app/views/pages/index.html.erb app/views/pages/index.ht... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 18,593 | git | # Git: Rename or move all files at once
I want to rename all erb files in my Git project to haml.(like index.html.erb to index.html.haml)
If I rename each file, I have to type the following command more than thirty times.
```
$ git mv app/views/pages/index.html.erb app/views/pages/index.html.haml
```
I tried the co... | ```
for i in $(find . -iname "*.erb"); do
git mv "$i" "$(echo $i | rev | cut -d '.' -f 2- | rev).haml";
done
```
For each .erb file, `git mv` it to itself with the extension ".erb" replaced by ".haml". |
4942191 | How do I see the list of changed files for a single commit, in Git? | 18 | 2011-02-09 07:06:21 | <p>When I say git status I get a list of changed files. I'd like to get a list of changed files for a commit. Is there a way to use git show or some other command to do that? Thanks.</p>
| 5,379 | 44,637 | 2012-05-09 09:09:31 | 4,942,540 | 34 | 2011-02-09 08:04:52 | 36,723 | 2011-02-09 08:04:52 | https://stackoverflow.com/q/4942191 | https://stackoverflow.com/a/4942540 | <p>Yes, simply pass the <code>--stat</code> flag:</p>
<pre><code>git show --stat 1268afe676e
</code></pre>
<p>For commits, <code>git show</code> takes the same formatting arguments as <code>git diff-tree</code>, so see <a href="http://www.kernel.org/pub/software/scm/git/docs/git-diff-tree.html" rel="noreferrer">the l... | <p>Yes, simply pass the <code>--stat</code> flag:</p> <pre><code>git show --stat 1268afe676e </code></pre> <p>For commits, <code>git show</code> takes the same formatting arguments as <code>git diff-tree</code>, so see <a href="http://www.kernel.org/pub/software/scm/git/docs/git-diff-tree.html" rel="noreferrer">the l... | 119 | git | <h1>How do I see the list of changed files for a single commit, in Git?</h1>
<p>When I say git status I get a list of changed files. I'd like to get a list of changed files for a commit. Is there a way to use git show or some other command to do that? Thanks.</p>
| q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 18,594 | git | # How do I see the list of changed files for a single commit, in Git?
When I say git status I get a list of changed files. I'd like to get a list of changed files for a commit. Is there a way to use git show or some other command to do that? Thanks. | Yes, simply pass the `--stat` flag:
```
git show --stat 1268afe676e
```
For commits, `git show` takes the same formatting arguments as `git diff-tree`, so see [the latter's documentation](http://www.kernel.org/pub/software/scm/git/docs/git-diff-tree.html) for other formatting options. |
39868114 | How to git fetch using gitpython? | 17 | 2016-10-05 07:42:14 | <p>I am looking for a equivalent way to fetch in gitpython</p>
<pre><code>git fetch --quiet --all
</code></pre>
<p>How can I perform git fetch in python?</p>
| 21,238 | 3,678,725 | 2016-10-05 08:12:15 | 39,868,183 | 34 | 2016-10-05 07:46:02 | 1,086,529 | 2016-10-05 08:12:15 | https://stackoverflow.com/q/39868114 | https://stackoverflow.com/a/39868183 | <p>The <a href="http://gitpython.readthedocs.io/en/stable/reference.html?highlight=Fetch#module-git.remote" rel="noreferrer"><code>fetch</code> method</a> is equivalent to issuing <code>git fetch</code>. Accordingly, you can fetch all your remotes by iterating and fetching each individually:</p>
<pre><code>repo = git.... | <p>The <a href="http://gitpython.readthedocs.io/en/stable/reference.html?highlight=Fetch#module-git.remote" rel="noreferrer"><code>fetch</code> method</a> is equivalent to issuing <code>git fetch</code>. Accordingly, you can fetch all your remotes by iterating and fetching each individually:</p> <pre><code>repo = git.... | 16, 119, 61013 | git, gitpython, python | <h1>How to git fetch using gitpython?</h1>
<p>I am looking for a equivalent way to fetch in gitpython</p>
<pre><code>git fetch --quiet --all
</code></pre>
<p>How can I perform git fetch in python?</p>
| q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 18,595 | git | # How to git fetch using gitpython?
I am looking for a equivalent way to fetch in gitpython
```
git fetch --quiet --all
```
How can I perform git fetch in python? | The [`fetch` method](http://gitpython.readthedocs.io/en/stable/reference.html?highlight=Fetch#module-git.remote) is equivalent to issuing `git fetch`. Accordingly, you can fetch all your remotes by iterating and fetching each individually:
```
repo = git.Repo('name_of_repo')
for remote in repo.remotes:
remote.fetc... |
18751063 | Trying to heroku git:clone after heroku fork yields an empty repository | 17 | 2013-09-11 20:52:40 | <p>I just ran:</p>
<pre><code>$ heroku fork -a oldapp newclonedapp
</code></pre>
<p>and it worked fine and runs etc. Now I want to pull the code down to work on it
[I realize heroku is not for version control and I usually use github for this but in this case I need to get the code from the clone] and when I try:</p>... | 6,728 | 2,284,821 | 2020-01-10 09:59:49 | 18,766,557 | 34 | 2013-09-12 14:08:48 | 1,339,184 | 2013-09-12 14:08:48 | https://stackoverflow.com/q/18751063 | https://stackoverflow.com/a/18766557 | <p>You're not doing anything wrong, it's a <a href="https://github.com/heroku/heroku/issues/748">known issue of fork</a> that it doesn't clone the source app repository. Until the issue is resolved, you'll need to manually clone the source repository. Here's how I'd do it:</p>
<pre><code>$ git clone git@heroku.com:old... | <p>You're not doing anything wrong, it's a <a href="https://github.com/heroku/heroku/issues/748">known issue of fork</a> that it doesn't clone the source app repository. Until the issue is resolved, you'll need to manually clone the source repository. Here's how I'd do it:</p> <pre><code>$ git clone git@heroku.com:old... | 119, 8279, 34099, 79324 | git, git-clone, git-fork, heroku | <h1>Trying to heroku git:clone after heroku fork yields an empty repository</h1>
<p>I just ran:</p>
<pre><code>$ heroku fork -a oldapp newclonedapp
</code></pre>
<p>and it worked fine and runs etc. Now I want to pull the code down to work on it
[I realize heroku is not for version control and I usually use github for... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 18,596 | git | # Trying to heroku git:clone after heroku fork yields an empty repository
I just ran:
```
$ heroku fork -a oldapp newclonedapp
```
and it worked fine and runs etc. Now I want to pull the code down to work on it
[I realize heroku is not for version control and I usually use github for this but in this case I need to ... | You're not doing anything wrong, it's a [known issue of fork](https://github.com/heroku/heroku/issues/748) that it doesn't clone the source app repository. Until the issue is resolved, you'll need to manually clone the source repository. Here's how I'd do it:
```
$ git clone git@heroku.com:oldapp.git -o old newcloneda... |
16118947 | How to create a new Patchset in Gerrit? | 17 | 2013-04-20 09:53:18 | <p>I am new to Gerrit and want to create a new Patch when new changes are submitted. I setup Gerrit with this guide <a href="https://review.typo3.org/Documentation/install-quick.html" rel="nofollow noreferrer">https://review.typo3.org/Documentation/install-quick.html</a></p>
<p>Then I try to create a new patch with <a... | 54,065 | 1,986,826 | 2021-11-06 06:22:24 | 16,229,784 | 34 | 2013-04-26 06:06:37 | 1,986,826 | 2021-11-06 06:22:24 | https://stackoverflow.com/q/16118947 | https://stackoverflow.com/a/16229784 | <p><strong>Step 1</strong>: Install commit-msg hooks for gerrit</p>
<pre><code>scp -p -P 29418 <gerrit_url>:hooks/commit-msg .git/hooks/
</code></pre>
<p><strong>Step 2</strong>: Create normal commit and push (for Patchset1)</p>
<p>for example:</p>
<pre><code>git add Server.java
git commit -m "server added&q... | <p><strong>Step 1</strong>: Install commit-msg hooks for gerrit</p> <pre><code>scp -p -P 29418 <gerrit_url>:hooks/commit-msg .git/hooks/ </code></pre> <p><strong>Step 2</strong>: Create normal commit and push (for Patchset1)</p> <p>for example:</p> <pre><code>git add Server.java git commit -m "server added&q... | 119, 30968, 52272, 53850 | gerrit, git, git-amend, git-commit | <h1>How to create a new Patchset in Gerrit?</h1>
<p>I am new to Gerrit and want to create a new Patch when new changes are submitted. I setup Gerrit with this guide <a href="https://review.typo3.org/Documentation/install-quick.html" rel="nofollow noreferrer">https://review.typo3.org/Documentation/install-quick.html</a>... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 18,597 | git | # How to create a new Patchset in Gerrit?
I am new to Gerrit and want to create a new Patch when new changes are submitted. I setup Gerrit with this guide <https://review.typo3.org/Documentation/install-quick.html>
Then I try to create a new patch with <http://gerrit.googlecode.com/svn/documentation/2.0/user-changeid... | **Step 1**: Install commit-msg hooks for gerrit
```
scp -p -P 29418 <gerrit_url>:hooks/commit-msg .git/hooks/
```
**Step 2**: Create normal commit and push (for Patchset1)
for example:
```
git add Server.java
git commit -m "server added"
git push origin HEAD:refs/for/master
```
**Step 3**: After doing some changes... |
7169103 | Git pull/fetch with refspec differences | 17 | 2011-08-24 00:28:37 | <p>Using refspec is a convenient way to grab a remote branch and create a similar one but with given name (or the other way round: create a remote one with a given name different from the local one). I'm puzzled about one tiny thing - as pull will also do the merge with current branch I would expect different behavior ... | 18,386 | 57,812 | 2022-02-20 20:02:46 | 7,169,390 | 34 | 2011-08-24 01:12:15 | 839,646 | 2011-08-24 01:12:15 | https://stackoverflow.com/q/7169103 | https://stackoverflow.com/a/7169390 | <p>A refspec is just a source/destination pair. Using a refspec <code>x:y</code> with <code>fetch</code> tells git to make a branch in this repo named "y" that is a copy of the branch named "x" in the remote repo. Nothing else.</p>
<p>With <code>pull</code>, git throws a merge on top. First, a fetch is done using the ... | <p>A refspec is just a source/destination pair. Using a refspec <code>x:y</code> with <code>fetch</code> tells git to make a branch in this repo named "y" that is a copy of the branch named "x" in the remote repo. Nothing else.</p> <p>With <code>pull</code>, git throws a merge on top. First, a fetch is done using the ... | 119, 28896, 33720 | git, git-fetch, git-pull | <h1>Git pull/fetch with refspec differences</h1>
<p>Using refspec is a convenient way to grab a remote branch and create a similar one but with given name (or the other way round: create a remote one with a given name different from the local one). I'm puzzled about one tiny thing - as pull will also do the merge with ... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 18,598 | git | # Git pull/fetch with refspec differences
Using refspec is a convenient way to grab a remote branch and create a similar one but with given name (or the other way round: create a remote one with a given name different from the local one). I'm puzzled about one tiny thing - as pull will also do the merge with current b... | A refspec is just a source/destination pair. Using a refspec `x:y` with `fetch` tells git to make a branch in this repo named "y" that is a copy of the branch named "x" in the remote repo. Nothing else.
With `pull`, git throws a merge on top. First, a fetch is done using the given refspec, and then the destination bra... |
3858563 | Active Git branch is "(no branch)" on hudson CI | 17 | 2010-10-04 19:46:19 | <p>My Ant build.xml script starts with</p>
<pre><code><property environment="env"/>
<echo>GIT_BRANCH = ${env.GIT_BRANCH}</echo>
<echo>PWD = ${env.PWD}</echo>
</code></pre>
<p>Hudson CI is setup to build when any branch changes. Console output is...</p>
<pre><code>Commencing build of Re... | 12,431 | 245,777 | 2017-11-10 16:19:42 | 4,055,820 | 34 | 2010-10-29 20:52:04 | 245,777 | 2010-10-29 20:52:04 | https://stackoverflow.com/q/3858563 | https://stackoverflow.com/a/4055820 | <p>RESOLVED</p>
<p>After seeing the comment by abayer in <a href="http://issues.hudson-ci.org/browse/HUDSON-6856" rel="noreferrer">Hudson bug 6856</a>, I took the following steps:</p>
<ul>
<li>Using the Hudson Plugin Manager, I updated my Hudson Git Plugin version 1.1) to get abayer's fix.</li>
<li>Using the Hudson J... | <p>RESOLVED</p> <p>After seeing the comment by abayer in <a href="http://issues.hudson-ci.org/browse/HUDSON-6856" rel="noreferrer">Hudson bug 6856</a>, I took the following steps:</p> <ul> <li>Using the Hudson Plugin Manager, I updated my Hudson Git Plugin version 1.1) to get abayer's fix.</li> <li>Using the Hudson J... | 119, 3858, 37230 | git, git-checkout, hudson | <h1>Active Git branch is "(no branch)" on hudson CI</h1>
<p>My Ant build.xml script starts with</p>
<pre><code><property environment="env"/>
<echo>GIT_BRANCH = ${env.GIT_BRANCH}</echo>
<echo>PWD = ${env.PWD}</echo>
</code></pre>
<p>Hudson CI is setup to build when any branch changes. Co... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 18,599 | git | # Active Git branch is "(no branch)" on hudson CI
My Ant build.xml script starts with
```
<property environment="env"/>
<echo>GIT_BRANCH = ${env.GIT_BRANCH}</echo>
<echo>PWD = ${env.PWD}</echo>
```
Hudson CI is setup to build when any branch changes. Console output is...
```
Commencing build of Revision 90906a63929... | RESOLVED
After seeing the comment by abayer in [Hudson bug 6856](http://issues.hudson-ci.org/browse/HUDSON-6856), I took the following steps:
- Using the Hudson Plugin Manager, I updated my Hudson Git Plugin version 1.1) to get abayer's fix.
- Using the Hudson Job Configuration, I clicked the "Advanced" button under ... |
64860931 | Why can't rbenv install the latest Ruby version on Ubuntu? | 16 | 2020-11-16 15:35:27 | <p>I want to install a recent version of Ruby on Ubuntu 20.04.
But when I run <code>rbenv install -l</code> on my Ubuntu server, I only see old versions of Ruby listed.</p>
<pre><code>Available versions:
1.8.5-p52
...
2.2.7
2.3.0-dev
2.3.0-preview1
2.3.0-preview2
2.3.0
2.3.1
2.3.2
2.3.3
2.3.4
2.... | 4,594 | 4,909,076 | 2024-05-01 22:43:16 | 64,860,970 | 34 | 2020-11-16 15:37:40 | 4,909,076 | 2020-11-16 15:37:40 | https://stackoverflow.com/q/64860931 | https://stackoverflow.com/a/64860970 | <p>I ran this command and it solved my problem.</p>
<pre><code>git clone https://github.com/rbenv/ruby-build.git ~/.rbenv/plugins/ruby-build
</code></pre>
<p>Now I see recent versions of Ruby.</p>
| <p>I ran this command and it solved my problem.</p> <pre><code>git clone https://github.com/rbenv/ruby-build.git ~/.rbenv/plugins/ruby-build </code></pre> <p>Now I see recent versions of Ruby.</p> | 12, 549, 97102 | digital-ocean, ruby, ubuntu | <h1>Why can't rbenv install the latest Ruby version on Ubuntu?</h1>
<p>I want to install a recent version of Ruby on Ubuntu 20.04.
But when I run <code>rbenv install -l</code> on my Ubuntu server, I only see old versions of Ruby listed.</p>
<pre><code>Available versions:
1.8.5-p52
...
2.2.7
2.3.0-dev
2.3.0-pr... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 18,600 | git | # Why can't rbenv install the latest Ruby version on Ubuntu?
I want to install a recent version of Ruby on Ubuntu 20.04.
But when I run `rbenv install -l` on my Ubuntu server, I only see old versions of Ruby listed.
```
Available versions:
1.8.5-p52
...
2.2.7
2.3.0-dev
2.3.0-preview1
2.3.0-preview2
2.3.... | I ran this command and it solved my problem.
```
git clone https://github.com/rbenv/ruby-build.git ~/.rbenv/plugins/ruby-build
```
Now I see recent versions of Ruby. |
28101020 | git status is showing "Changes not staged for commit" for files listed in .gitignore? | 16 | 2015-01-23 00:15:55 | <p>Let is look at the .gitignore file - to which I added mllib/pom.xml and pom.xml and even .gitignore (which should not be necessary - so something is amiss..):</p>
<pre><code>$head .gitignore
.gitignore
mllib/pom.xml
pom.xml
</code></pre>
<p>So then let's see what files git wants to add:</p>
<pre><code>$ git statu... | 23,485 | 1,056,563 | 2022-08-25 22:47:19 | 28,101,230 | 34 | 2015-01-23 00:37:45 | 1,256,452 | 2016-10-20 16:30:32 | https://stackoverflow.com/q/28101020 | https://stackoverflow.com/a/28101230 | <p>The <code>.gitignore</code> file doesn't mean what you think it means.<sup>1</sup></p>
<p>In particular, once you have made a file "known" to git, in that it's in the index, adding that file's name to <code>.gitignore</code> has no effect. Git already tracks the file, and it will continue to track it.</p>
<p>In e... | <p>The <code>.gitignore</code> file doesn't mean what you think it means.<sup>1</sup></p> <p>In particular, once you have made a file "known" to git, in that it's in the index, adding that file's name to <code>.gitignore</code> has no effect. Git already tracks the file, and it will continue to track it.</p> <p>In e... | 119, 25056 | git, gitignore | <h1>git status is showing "Changes not staged for commit" for files listed in .gitignore?</h1>
<p>Let is look at the .gitignore file - to which I added mllib/pom.xml and pom.xml and even .gitignore (which should not be necessary - so something is amiss..):</p>
<pre><code>$head .gitignore
.gitignore
mllib/pom.xml
pom.x... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 18,602 | git | # git status is showing "Changes not staged for commit" for files listed in .gitignore?
Let is look at the .gitignore file - to which I added mllib/pom.xml and pom.xml and even .gitignore (which should not be necessary - so something is amiss..):
```
$head .gitignore
.gitignore
mllib/pom.xml
pom.xml
```
So then let'... | The `.gitignore` file doesn't mean what you think it means.1
In particular, once you have made a file "known" to git, in that it's in the index, adding that file's name to `.gitignore` has no effect. Git already tracks the file, and it will continue to track it.
In essence, the `.gitignore` file is not actually a lis... |
64462922 | docker multi-stage build Go image - x509: certificate signed by unknown authority | 15 | 2020-10-21 11:51:49 | <p>I try to build <a href="/questions/tagged/go" class="post-tag" title="show questions tagged 'go'" rel="tag">go</a> images in <em><strong>private corp</strong></em> network use <a href="/questions/tagged/docker-multi-stage-build" class="post-tag" title="show questions tagged 'docker-multi-stage-build'... | 41,970 | 8,030,651 | 2023-02-17 15:39:35 | 65,420,450 | 34 | 2020-12-23 07:26:20 | 8,030,651 | 2021-08-31 08:28:38 | https://stackoverflow.com/q/64462922 | https://stackoverflow.com/a/65420450 | <p><code>git</code> uses <code>curl</code> to access the <code>https</code> servers so you need to import the certificate into the <code>CA store</code> of the system.</p>
<p>The workaround is to define the environment variable <code>GIT_SSL_NO_VERIFY=1</code> on your Agent environment variables, <strong>but it doesn't... | <p><code>git</code> uses <code>curl</code> to access the <code>https</code> servers so you need to import the certificate into the <code>CA store</code> of the system.</p> <p>The workaround is to define the environment variable <code>GIT_SSL_NO_VERIFY=1</code> on your Agent environment variables, <strong>but it doesn't... | 15627, 90304, 129796, 130372, 132199 | docker, docker-multi-stage-build, go, go-build, go-git | <h1>docker multi-stage build Go image - x509: certificate signed by unknown authority</h1>
<p>I try to build <a href="/questions/tagged/go" class="post-tag" title="show questions tagged 'go'" rel="tag">go</a> images in <em><strong>private corp</strong></em> network use <a href="/questions/tagged/docker-multi-st... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 18,603 | git | # docker multi-stage build Go image - x509: certificate signed by unknown authority
I try to build [go](/questions/tagged/go "show questions tagged 'go'") images in ***private corp*** network use [docker-multi-stage-build](/questions/tagged/docker-multi-stage-build "show questions tagged 'docker-multi-stage-build'"):
... | `git` uses `curl` to access the `https` servers so you need to import the certificate into the `CA store` of the system.
The workaround is to define the environment variable `GIT_SSL_NO_VERIFY=1` on your Agent environment variables, **but it doesn't work when using `go get` or `go mod download`** 😭.
To import the ce... |
45400553 | the receiving end does not support push options | 15 | 2017-07-30 13:55:14 | <p>At first my server's git version was 2.7.4 and the error was accurate. Afterwards, however, I updated and have confirmed this with git version:</p>
<p>Server</p>
<pre><code>$ git --version
git version 2.13.0
</code></pre>
<p>Client</p>
<pre><code>$ git --version
git version 2.11.0 (Apple Git-81)
</code></pre... | 9,492 | 6,359,249 | 2024-07-29 22:06:15 | 45,400,809 | 34 | 2017-07-30 14:23:10 | 6,359,249 | 2024-07-29 22:06:15 | https://stackoverflow.com/q/45400553 | https://stackoverflow.com/a/45400809 | <p>After searching through code until I found the actual <a href="https://github.com/git/git/blob/master/t/t5545-push-options.sh" rel="nofollow noreferrer">tests</a> for push options I found out you have to enable a specific config for the repository which is <em>conveniently</em> disabled by default: <a href="https://... | <p>After searching through code until I found the actual <a href="https://github.com/git/git/blob/master/t/t5545-push-options.sh" rel="nofollow noreferrer">tests</a> for push options I found out you have to enable a specific config for the repository which is <em>conveniently</em> disabled by default: <a href="https://... | 119, 43087, 46734 | git, githooks, git-post-receive | <h1>the receiving end does not support push options</h1>
<p>At first my server's git version was 2.7.4 and the error was accurate. Afterwards, however, I updated and have confirmed this with git version:</p>
<p>Server</p>
<pre><code>$ git --version
git version 2.13.0
</code></pre>
<p>Client</p>
<pre><code>$ git -... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 18,604 | git | # the receiving end does not support push options
At first my server's git version was 2.7.4 and the error was accurate. Afterwards, however, I updated and have confirmed this with git version:
Server
```
$ git --version
git version 2.13.0
```
Client
```
$ git --version
git version 2.11.0 (Apple Git-81)
```
Y... | After searching through code until I found the actual [tests](https://github.com/git/git/blob/master/t/t5545-push-options.sh) for push options I found out you have to enable a specific config for the repository which is *conveniently* disabled by default: <https://git-scm.com/docs/git-config#Documentation/git-config.tx... |
38549616 | Travis determine which files changed | 15 | 2016-07-24 07:12:13 | <p>I have a Travis script that runs for every push.</p>
<p>I need to determine which files were modified in this push.</p>
<p>Currently, I have this:</p>
<p><code>CHANGED_FILES=($(git diff --name-only HEAD HEAD~1))</code></p>
<p>The problem is that sometimes a push can include more than one commits, and this only l... | 3,307 | 25,645 | 2016-07-24 10:05:45 | 38,550,849 | 34 | 2016-07-24 10:05:45 | 25,645 | 2016-07-24 10:05:45 | https://stackoverflow.com/q/38549616 | https://stackoverflow.com/a/38550849 | <p>I found out there is a Travis environment variable: <code>$TRAVIS_COMMIT_RANGE</code>.</p>
<p>Then it was only a matter of changing the script to:</p>
<p><code>CHANGED_FILES=($(git diff --name-only $TRAVIS_COMMIT_RANGE))</code></p>
| <p>I found out there is a Travis environment variable: <code>$TRAVIS_COMMIT_RANGE</code>.</p> <p>Then it was only a matter of changing the script to:</p> <p><code>CHANGED_FILES=($(git diff --name-only $TRAVIS_COMMIT_RANGE))</code></p> | 119, 74123 | git, travis-ci | <h1>Travis determine which files changed</h1>
<p>I have a Travis script that runs for every push.</p>
<p>I need to determine which files were modified in this push.</p>
<p>Currently, I have this:</p>
<p><code>CHANGED_FILES=($(git diff --name-only HEAD HEAD~1))</code></p>
<p>The problem is that sometimes a push can ... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 18,606 | git | # Travis determine which files changed
I have a Travis script that runs for every push.
I need to determine which files were modified in this push.
Currently, I have this:
`CHANGED_FILES=($(git diff --name-only HEAD HEAD~1))`
The problem is that sometimes a push can include more than one commits, and this only loo... | I found out there is a Travis environment variable: `$TRAVIS_COMMIT_RANGE`.
Then it was only a matter of changing the script to:
`CHANGED_FILES=($(git diff --name-only $TRAVIS_COMMIT_RANGE))` |
6435246 | Trouble on setting the git 'core.editor' | 15 | 2011-06-22 05:20:20 | <p>I am trying to set git on my <em>Mac Os Snow Leopard 10.6.7</em> but I made some errors on doing that... </p>
<p>At this time I have the following <em>warning</em>:</p>
<pre><code>$ git config --global core.editor
EDITOR=/usr/bin/vim
error: More than one value for the key core.editor: mate
$ git config --global co... | 20,728 | 502,052 | 2021-02-12 10:50:47 | 6,435,291 | 34 | 2011-06-22 05:26:28 | 13,986 | 2011-06-22 05:48:17 | https://stackoverflow.com/q/6435246 | https://stackoverflow.com/a/6435291 | <p>The easiest way is to change the environment variable EDITOR to point to mate. In your <code>.bash_profile</code> add the following:</p>
<pre><code>export EDITOR="/usr/local/bin/mate -w"
</code></pre>
<p>and re-start your terminal session, or source the <code>.bash_profile</code>.</p>
<p>As for your error message... | <p>The easiest way is to change the environment variable EDITOR to point to mate. In your <code>.bash_profile</code> add the following:</p> <pre><code>export EDITOR="/usr/local/bin/mate -w" </code></pre> <p>and re-start your terminal session, or source the <code>.bash_profile</code>.</p> <p>As for your error message... | 119, 369, 1716, 5025, 32395 | editor, git, macos, osx-snow-leopard, warnings | <h1>Trouble on setting the git 'core.editor'</h1>
<p>I am trying to set git on my <em>Mac Os Snow Leopard 10.6.7</em> but I made some errors on doing that... </p>
<p>At this time I have the following <em>warning</em>:</p>
<pre><code>$ git config --global core.editor
EDITOR=/usr/bin/vim
error: More than one value for ... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 18,608 | git | # Trouble on setting the git 'core.editor'
I am trying to set git on my *Mac Os Snow Leopard 10.6.7* but I made some errors on doing that...
At this time I have the following *warning*:
```
$ git config --global core.editor
EDITOR=/usr/bin/vim
error: More than one value for the key core.editor: mate
$ git config --g... | The easiest way is to change the environment variable EDITOR to point to mate. In your `.bash_profile` add the following:
```
export EDITOR="/usr/local/bin/mate -w"
```
and re-start your terminal session, or source the `.bash_profile`.
As for your error message:
```
error: More than one value for the key core.edito... |
39957760 | How to fetch all remote branches? | 14 | 2016-10-10 11:57:50 | <p>Somehow one of my repositories refuses to fetch new branches:</p>
<pre><code>C:\temp>git fetch --all
Fetching origin
C:\temp>git branch -a
* develop
remotes/origin/develop
C:\temp>git ls-remote --heads origin
d130c97c1ccbe9ab35cd6e268c760781e37e3628 refs/heads/2.1.0.x
...
92685125df152fe053a2818de0c4d2ce... | 19,936 | 29,290 | 2024-12-09 07:10:40 | 39,957,858 | 34 | 2016-10-10 12:03:22 | 6,309 | 2016-10-10 12:08:12 | https://stackoverflow.com/q/39957760 | https://stackoverflow.com/a/39957858 | <p>Check you <code>git config --get remote.origin.fetch</code> <strong><a href="https://git-scm.com/book/en/v2/Git-Internals-The-Refspec" rel="noreferrer">refspec</a></strong>.</p>
<p>It would only fetch <em>all</em> branches if the refspec is </p>
<pre><code>+refs/heads/*:refs/remotes/origin/*
</code></pre>
<p>If t... | <p>Check you <code>git config --get remote.origin.fetch</code> <strong><a href="https://git-scm.com/book/en/v2/Git-Internals-The-Refspec" rel="noreferrer">refspec</a></strong>.</p> <p>It would only fetch <em>all</em> branches if the refspec is </p> <pre><code>+refs/heads/*:refs/remotes/origin/* </code></pre> <p>If t... | 119 | git | <h1>How to fetch all remote branches?</h1>
<p>Somehow one of my repositories refuses to fetch new branches:</p>
<pre><code>C:\temp>git fetch --all
Fetching origin
C:\temp>git branch -a
* develop
remotes/origin/develop
C:\temp>git ls-remote --heads origin
d130c97c1ccbe9ab35cd6e268c760781e37e3628 refs/heads/2... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 18,610 | git | # How to fetch all remote branches?
Somehow one of my repositories refuses to fetch new branches:
```
C:\temp>git fetch --all
Fetching origin
C:\temp>git branch -a
* develop
remotes/origin/develop
C:\temp>git ls-remote --heads origin
d130c97c1ccbe9ab35cd6e268c760781e37e3628 refs/heads/2.1.0.x
...
92685125df152fe053... | Check you `git config --get remote.origin.fetch` **[refspec](https://git-scm.com/book/en/v2/Git-Internals-The-Refspec)**.
It would only fetch *all* branches if the refspec is
```
+refs/heads/*:refs/remotes/origin/*
```
If the refspec is:
```
+refs/heads/develop:refs/remotes/origin/develop
```
Then a `fetch` would ... |
36087071 | How can I copy one specific commit to another branch? | 14 | 2016-03-18 14:34:30 | <p>I have 2 branches :</p>
<ul>
<li>branchA</li>
<li>branchB</li>
</ul>
<p>I checkout <code>branchB</code>, and fix a small thing while I am on that branch.</p>
<pre><code>commit f2c88cad3d7648cad9c12e724d09db0952abec63
Author: Name <email>
Date: Fri Mar 18 09:10:22 2016 -0400
Fix small bug on dashboard
<... | 15,871 | 4,480,164 | 2023-03-07 21:02:40 | 36,087,090 | 34 | 2016-03-18 14:35:19 | 418,235 | 2016-03-18 14:35:19 | https://stackoverflow.com/q/36087071 | https://stackoverflow.com/a/36087090 | <p>You can use git cherry-pick command to copy commit to another branch. In your case, once you checkout branchA then do</p>
<pre><code>git cherry-pick f2c88ca
</code></pre>
| <p>You can use git cherry-pick command to copy commit to another branch. In your case, once you checkout branchA then do</p> <pre><code>git cherry-pick f2c88ca </code></pre> | 119 | git | <h1>How can I copy one specific commit to another branch?</h1>
<p>I have 2 branches :</p>
<ul>
<li>branchA</li>
<li>branchB</li>
</ul>
<p>I checkout <code>branchB</code>, and fix a small thing while I am on that branch.</p>
<pre><code>commit f2c88cad3d7648cad9c12e724d09db0952abec63
Author: Name <email>
Date: Fr... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 18,611 | git | # How can I copy one specific commit to another branch?
I have 2 branches :
- branchA
- branchB
I checkout `branchB`, and fix a small thing while I am on that branch.
```
commit f2c88cad3d7648cad9c12e724d09db0952abec63
Author: Name <email>
Date: Fri Mar 18 09:10:22 2016 -0400
Fix small bug on dashboard
```
... | You can use git cherry-pick command to copy commit to another branch. In your case, once you checkout branchA then do
```
git cherry-pick f2c88ca
``` |
3556501 | Git: How to reset after merging? | 14 | 2010-08-24 12:42:57 | <p>I've merged a master branch from a friend's repository into my working directory into branch_a using:</p>
<pre><code>git pull my_friend master
</code></pre>
<p>I've discovered that the merged version has errors. To continue development I would like to revert to my last commit before the merge.<br>
I tried:</p>
<p... | 27,198 | 348,545 | 2010-08-24 15:03:24 | 3,556,603 | 34 | 2010-08-24 12:55:00 | 119,963 | 2010-08-24 12:55:00 | https://stackoverflow.com/q/3556501 | https://stackoverflow.com/a/3556603 | <p><code>HEAD</code> refers to the current commit (generally the tip of the currently checked-out branch). You've already committed your merge, so <code>HEAD</code> is pointing to the merge commit. If you want to get back to the commit before it, use:</p>
<pre><code>git reset --hard HEAD^
</code></pre>
<p>The <code>^... | <p><code>HEAD</code> refers to the current commit (generally the tip of the currently checked-out branch). You've already committed your merge, so <code>HEAD</code> is pointing to the merge commit. If you want to get back to the commit before it, use:</p> <pre><code>git reset --hard HEAD^ </code></pre> <p>The <code>^... | 119, 34403 | git, git-revert | <h1>Git: How to reset after merging?</h1>
<p>I've merged a master branch from a friend's repository into my working directory into branch_a using:</p>
<pre><code>git pull my_friend master
</code></pre>
<p>I've discovered that the merged version has errors. To continue development I would like to revert to my last com... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 18,612 | git | # Git: How to reset after merging?
I've merged a master branch from a friend's repository into my working directory into branch_a using:
```
git pull my_friend master
```
I've discovered that the merged version has errors. To continue development I would like to revert to my last commit before the merge.
I tried:
... | `HEAD` refers to the current commit (generally the tip of the currently checked-out branch). You've already committed your merge, so `HEAD` is pointing to the merge commit. If you want to get back to the commit before it, use:
```
git reset --hard HEAD^
```
The `^` means "first parent of"; for a regular commit it's t... |
24535572 | How do I tell git to ignore my local changes, but leave the file in my remote repo? | 13 | 2014-07-02 15:46:52 | <p>Constantly changing my web.config file when testing/pushing to production gets old, so does having to remember to remove that from my staged changes when I don't change the file.</p>
<p>I have tried using selecting the "stop tracking" option in Sourcetree (which I think adds the file to my GitIgnore), but that look... | 9,026 | 967,405 | 2014-07-02 15:48:14 | 24,535,600 | 34 | 2014-07-02 15:48:14 | 3,764,814 | 2014-07-02 15:48:14 | https://stackoverflow.com/q/24535572 | https://stackoverflow.com/a/24535600 | <p>Use the following command:</p>
<pre><code>git update-index --assume-unchanged <filename>
</code></pre>
<p>If you want to undo it later, use:</p>
<pre><code>git update-index --no-assume-unchanged <filename>
</code></pre>
| <p>Use the following command:</p> <pre><code>git update-index --assume-unchanged <filename> </code></pre> <p>If you want to undo it later, use:</p> <pre><code>git update-index --no-assume-unchanged <filename> </code></pre> | 119, 90056 | atlassian-sourcetree, git | <h1>How do I tell git to ignore my local changes, but leave the file in my remote repo?</h1>
<p>Constantly changing my web.config file when testing/pushing to production gets old, so does having to remember to remove that from my staged changes when I don't change the file.</p>
<p>I have tried using selecting the "sto... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 18,614 | git | # How do I tell git to ignore my local changes, but leave the file in my remote repo?
Constantly changing my web.config file when testing/pushing to production gets old, so does having to remember to remove that from my staged changes when I don't change the file.
I have tried using selecting the "stop tracking" opti... | Use the following command:
```
git update-index --assume-unchanged <filename>
```
If you want to undo it later, use:
```
git update-index --no-assume-unchanged <filename>
``` |
31430447 | Git fails to revert: Found a swap file "COMMIT_EDITMSG.swp" | 11 | 2015-07-15 12:30:26 | <p>I'm using git inside Visual Studio 2013. I'm trying to revert to a specific commit without losing the history leading from that commit to the current commit. In other words, I want git to generate a new commit that has the same snapshot as the specified commit. This is what I've done:</p>
<pre><code>git revert <... | 24,503 | 110,028 | 2015-07-15 12:40:18 | 31,430,615 | 34 | 2015-07-15 12:37:55 | 216,074 | 2015-07-15 12:37:55 | https://stackoverflow.com/q/31430447 | https://stackoverflow.com/a/31430615 | <p>The swap file is created by the editor vim when you start editing a file; it essentially is a backup file in case the editor crashes.</p>
<p>Now, if the editor launches and finds a swap file, it will usually prompt you to decide what to do, whether to restore the previous editor session or to discard those changes.... | <p>The swap file is created by the editor vim when you start editing a file; it essentially is a backup file in case the editor crashes.</p> <p>Now, if the editor launches and finds a swap file, it will usually prompt you to decide what to do, whether to restore the previous editor session or to discard those changes.... | 119 | git | <h1>Git fails to revert: Found a swap file "COMMIT_EDITMSG.swp"</h1>
<p>I'm using git inside Visual Studio 2013. I'm trying to revert to a specific commit without losing the history leading from that commit to the current commit. In other words, I want git to generate a new commit that has the same snapshot as the spec... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 18,615 | git | # Git fails to revert: Found a swap file "COMMIT_EDITMSG.swp"
I'm using git inside Visual Studio 2013. I'm trying to revert to a specific commit without losing the history leading from that commit to the current commit. In other words, I want git to generate a new commit that has the same snapshot as the specified com... | The swap file is created by the editor vim when you start editing a file; it essentially is a backup file in case the editor crashes.
Now, if the editor launches and finds a swap file, it will usually prompt you to decide what to do, whether to restore the previous editor session or to discard those changes.
If you d... |
20111476 | Installing Git on CentOs | 9 | 2013-11-21 02:45:20 | <p>I want to install git on CentOs, i'm running this command</p>
<pre><code>yum install git-core
</code></pre>
<p>But the problem is, I am getting these errors:</p>
<pre><code>Loaded plugins: fastestmirror, security
Loading mirror speeds from cached hostfile
* epel: mirrors.solfo.com
Setting up Install Process
Reso... | 7,027 | 822,465 | 2015-04-09 10:12:08 | 20,113,824 | 34 | 2013-11-21 06:16:58 | 6,309 | 2014-03-05 12:57:32 | https://stackoverflow.com/q/20111476 | https://stackoverflow.com/a/20113824 | <p>This <a href="http://www.alwayssababa.com/installing-git-on-centos-w-cpanel" rel="noreferrer">blog article by lishevita</a> mentions:</p>
<blockquote>
<p>It turns out, <strong>Cpanel blocks installation of any perl packages through yum in order to make sure that nothing interferes with their customized packages</... | <p>This <a href="http://www.alwayssababa.com/installing-git-on-centos-w-cpanel" rel="noreferrer">blog article by lishevita</a> mentions:</p> <blockquote> <p>It turns out, <strong>Cpanel blocks installation of any perl packages through yum in order to make sure that nothing interferes with their customized packages</... | 119 | git | <h1>Installing Git on CentOs</h1>
<p>I want to install git on CentOs, i'm running this command</p>
<pre><code>yum install git-core
</code></pre>
<p>But the problem is, I am getting these errors:</p>
<pre><code>Loaded plugins: fastestmirror, security
Loading mirror speeds from cached hostfile
* epel: mirrors.solfo.c... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 18,617 | git | # Installing Git on CentOs
I want to install git on CentOs, i'm running this command
```
yum install git-core
```
But the problem is, I am getting these errors:
```
Loaded plugins: fastestmirror, security
Loading mirror speeds from cached hostfile
* epel: mirrors.solfo.com
Setting up Install Process
Resolving Depe... | This [blog article by lishevita](http://www.alwayssababa.com/installing-git-on-centos-w-cpanel) mentions:
> It turns out, **Cpanel blocks installation of any perl packages through yum in order to make sure that nothing interferes with their customized packages**.
> Pain in the NECK!
>
> The good news is that the per... |
1964470 | What's the equivalent of Subversion's "use-commit-times" for Git? | 122 | 2009-12-26 21:53:53 | <p>I need the timestamps of files on my local system and on my server to be in sync. This is accomplished with <a href="https://en.wikipedia.org/wiki/Apache_Subversion" rel="noreferrer">Subversion</a> by setting <em>use-commit-times=true</em> in the configuration so that the last modified of each file is when it was co... | 36,756 | 238,972 | 2025-07-29 20:22:29 | 1,964,508 | 33 | 2009-12-26 22:11:32 | 6,309 | 2022-10-22 20:19:30 | https://stackoverflow.com/q/1964470 | https://stackoverflow.com/a/1964508 | <p>I am not sure this would be appropriate for a DVCS (as in "Distributed" VCS)</p>
<p>The huge discussion had already took place in <a href="https://web.archive.org/web/20120518150852/http://kerneltrap.org/mailarchive/git/2007/3/5/240536" rel="nofollow noreferrer">2007 (see this thread)</a></p>
<p>And some o... | <p>I am not sure this would be appropriate for a DVCS (as in "Distributed" VCS)</p> <p>The huge discussion had already took place in <a href="https://web.archive.org/web/20120518150852/http://kerneltrap.org/mailarchive/git/2007/3/5/240536" rel="nofollow noreferrer">2007 (see this thread)</a></p> <p>And some o... | 119 | git | <h1>What's the equivalent of Subversion's "use-commit-times" for Git?</h1>
<p>I need the timestamps of files on my local system and on my server to be in sync. This is accomplished with <a href="https://en.wikipedia.org/wiki/Apache_Subversion" rel="noreferrer">Subversion</a> by setting <em>use-commit-times=true</em> in... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 18,619 | git | # What's the equivalent of Subversion's "use-commit-times" for Git?
I need the timestamps of files on my local system and on my server to be in sync. This is accomplished with [Subversion](https://en.wikipedia.org/wiki/Apache_Subversion) by setting *use-commit-times=true* in the configuration so that the last modified... | I am not sure this would be appropriate for a DVCS (as in "Distributed" VCS)
The huge discussion had already took place in [2007 (see this thread)](https://web.archive.org/web/20120518150852/http://kerneltrap.org/mailarchive/git/2007/3/5/240536)
And some of Linus's answer were not too keen on the idea. Here is one sa... |
51263438 | How to solve "Unable to find git in your PATH" on Flutter? | 111 | 2018-07-10 10:56:15 | <p>I've just tried to install Flutter on Linux and when I try to run a flutter command (flutter doctor), I'm getting</p>
<pre><code>Error: Unable to find git in your PATH.
</code></pre>
<p>How can I solve this?</p>
| 314,689 | 4,764,353 | 2025-01-30 01:46:45 | 51,263,641 | 33 | 2018-07-10 11:08:08 | 2,779,389 | 2023-07-22 00:35:20 | https://stackoverflow.com/q/51263438 | https://stackoverflow.com/a/51263641 | <p>Install it using following command.</p>
<pre><code>sudo apt-get install git
</code></pre>
| <p>Install it using following command.</p> <pre><code>sudo apt-get install git </code></pre> | 119, 115695, 129712, 131495 | flutter, flutter-dependencies, flutter-test, git | <h1>How to solve "Unable to find git in your PATH" on Flutter?</h1>
<p>I've just tried to install Flutter on Linux and when I try to run a flutter command (flutter doctor), I'm getting</p>
<pre><code>Error: Unable to find git in your PATH.
</code></pre>
<p>How can I solve this?</p>
| q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 18,620 | git | # How to solve "Unable to find git in your PATH" on Flutter?
I've just tried to install Flutter on Linux and when I try to run a flutter command (flutter doctor), I'm getting
```
Error: Unable to find git in your PATH.
```
How can I solve this? | Install it using following command.
```
sudo apt-get install git
``` |
5281663 | How do you tell git to stash the index only? | 107 | 2011-03-12 09:18:36 | <p>I have just used <code>git add -p</code> to add a bunch of changes to the index, and I just realised that I missed a change that should've gone into the previous commit.</p>
<p>I can't <code>commit --amend</code> now because I've added all these new changes to the index, and I don't want to use 'git reset' to remove... | 35,114 | 308,237 | 2023-04-26 17:48:24 | 5,281,686 | 33 | 2011-03-12 09:24:16 | 582 | 2011-03-12 09:24:16 | https://stackoverflow.com/q/5281663 | https://stackoverflow.com/a/5281686 | <p>Simplest way is to leave off that change right now, make your new commit, then create a second commit with just that change you want to use to amend and then use <code>git rebase -i</code> to squash it with the original HEAD.</p>
<p>An alternative would be to make your commit, tag it, roll back with <code>git reset... | <p>Simplest way is to leave off that change right now, make your new commit, then create a second commit with just that change you want to use to amend and then use <code>git rebase -i</code> to squash it with the original HEAD.</p> <p>An alternative would be to make your commit, tag it, roll back with <code>git reset... | 119 | git | <h1>How do you tell git to stash the index only?</h1>
<p>I have just used <code>git add -p</code> to add a bunch of changes to the index, and I just realised that I missed a change that should've gone into the previous commit.</p>
<p>I can't <code>commit --amend</code> now because I've added all these new changes to th... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 18,621 | git | # How do you tell git to stash the index only?
I have just used `git add -p` to add a bunch of changes to the index, and I just realised that I missed a change that should've gone into the previous commit.
I can't `commit --amend` now because I've added all these new changes to the index, and I don't want to use 'git... | Simplest way is to leave off that change right now, make your new commit, then create a second commit with just that change you want to use to amend and then use `git rebase -i` to squash it with the original HEAD.
An alternative would be to make your commit, tag it, roll back with `git reset HEAD^`, add that one chan... |
36039687 | Git pull - Please move or remove them before you can merge | 104 | 2016-03-16 15:11:53 | <p>I am trying to do a <code>git pull origin master</code> from my server but keep getting the error:</p>
<p><code>Please move or remove them before you can merge.</code></p>
<p>There are no untracked files, but it seems like it has issues with the <em>ignored files</em> for some reason.</p>
<p>I tried running a <co... | 317,411 | 472,501 | 2024-04-19 09:10:42 | 36,040,077 | 33 | 2016-03-16 15:27:13 | 4,787,126 | 2020-04-03 21:22:03 | https://stackoverflow.com/q/36039687 | https://stackoverflow.com/a/36040077 | <p>Apparently the files were added in remote repository, no matter what was the content of <code>.gitignore</code> file in the origin.</p>
<p>As the files exist in the remote repository, git has to pull them to your local work tree as well and therefore complains that the files already exist.</p>
<p><code>.gitignore<... | <p>Apparently the files were added in remote repository, no matter what was the content of <code>.gitignore</code> file in the origin.</p> <p>As the files exist in the remote repository, git has to pull them to your local work tree as well and therefore complains that the files already exist.</p> <p><code>.gitignore<... | 119, 28896, 28897, 68596 | git, git-clean, git-merge, git-pull | <h1>Git pull - Please move or remove them before you can merge</h1>
<p>I am trying to do a <code>git pull origin master</code> from my server but keep getting the error:</p>
<p><code>Please move or remove them before you can merge.</code></p>
<p>There are no untracked files, but it seems like it has issues with the <... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 18,622 | git | # Git pull - Please move or remove them before you can merge
I am trying to do a `git pull origin master` from my server but keep getting the error:
`Please move or remove them before you can merge.`
There are no untracked files, but it seems like it has issues with the *ignored files* for some reason.
I tried runn... | Apparently the files were added in remote repository, no matter what was the content of `.gitignore` file in the origin.
As the files exist in the remote repository, git has to pull them to your local work tree as well and therefore complains that the files already exist.
`.gitignore` is used only for scanning for th... |
26167387 | Run git commands from a C# function | 53 | 2014-10-02 18:40:05 | <p>How can my C# code run git commands when it detects changes in tracked file? I am writing a VisualStudio/C# console project for this purpose. </p>
<p>I am new to the the .NET environment and currently working on integrating automated GIT commits to a folder. I need to automatically commit any change/add/delete on a... | 63,361 | 205,975 | 2023-07-07 22:17:56 | 26,174,574 | 33 | 2014-10-03 07:01:17 | 4,049,331 | 2020-06-13 15:39:20 | https://stackoverflow.com/q/26167387 | https://stackoverflow.com/a/26174574 | <p>If you want to do it in C#, you can call the external git command by Process.Start when you detect file change</p>
<pre><code>string gitCommand = "git";
string gitAddArgument = @"add -A";
string gitCommitArgument = @"commit ""explanations_of_changes""";
string gitPushArgument = @"push our_remote";
Process.Start(gi... | <p>If you want to do it in C#, you can call the external git command by Process.Start when you detect file change</p> <pre><code>string gitCommand = "git"; string gitAddArgument = @"add -A"; string gitCommitArgument = @"commit ""explanations_of_changes"""; string gitPushArgument = @"push our_remote"; Process.Start(gi... | 9, 119, 456, 34595, 93364 | c#, git, version-control, visual-studio-2013, windows-7 | <h1>Run git commands from a C# function</h1>
<p>How can my C# code run git commands when it detects changes in tracked file? I am writing a VisualStudio/C# console project for this purpose. </p>
<p>I am new to the the .NET environment and currently working on integrating automated GIT commits to a folder. I need to au... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 18,627 | git | # Run git commands from a C# function
How can my C# code run git commands when it detects changes in tracked file? I am writing a VisualStudio/C# console project for this purpose.
I am new to the the .NET environment and currently working on integrating automated GIT commits to a folder. I need to automatically commi... | If you want to do it in C#, you can call the external git command by Process.Start when you detect file change
```
string gitCommand = "git";
string gitAddArgument = @"add -A";
string gitCommitArgument = @"commit ""explanations_of_changes""";
string gitPushArgument = @"push our_remote";
Process.Start(gitCommand, gitA... |
924574 | Git alternatives to "svn info" that can be included in a build for traceability? | 53 | 2009-05-29 05:50:35 | <p>I'm looking for a Git alternatives to "svn info".</p>
<p>Today I added some information that Subversion gives me with the "svn info" command right into my build, and that is then pushed into a source file that prints this during startup.
That way I always know where that build came from and how to get it back again... | 61,742 | 51,425 | 2022-02-14 11:59:06 | 924,657 | 33 | 2009-05-29 06:25:07 | 6,309 | 2022-02-14 11:59:06 | https://stackoverflow.com/q/924574 | https://stackoverflow.com/a/924657 | <p>To complete Charles's answer, you also can make a script displaying "sn info" like information, like <a href="http://blog.inquirylabs.com/2008/06/12/git-info-kinda-like-svn-info/" rel="nofollow noreferrer">this one</a> (already <a href="http://kerneltrap.org/mailarchive/git/2007/11/12/406496" rel="nofollow... | <p>To complete Charles's answer, you also can make a script displaying "sn info" like information, like <a href="http://blog.inquirylabs.com/2008/06/12/git-info-kinda-like-svn-info/" rel="nofollow noreferrer">this one</a> (already <a href="http://kerneltrap.org/mailarchive/git/2007/11/12/406496" rel="nofollow... | 119 | git | <h1>Git alternatives to "svn info" that can be included in a build for traceability?</h1>
<p>I'm looking for a Git alternatives to "svn info".</p>
<p>Today I added some information that Subversion gives me with the "svn info" command right into my build, and that is then pushed into a source file that prints this duri... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 18,629 | git | # Git alternatives to "svn info" that can be included in a build for traceability?
I'm looking for a Git alternatives to "svn info".
Today I added some information that Subversion gives me with the "svn info" command right into my build, and that is then pushed into a source file that prints this during startup.
That... | To complete Charles's answer, you also can make a script displaying "sn info" like information, like [this one](http://blog.inquirylabs.com/2008/06/12/git-info-kinda-like-svn-info/) (already [mentioned there](http://kerneltrap.org/mailarchive/git/2007/11/12/406496))
```
#!/bin/bash
# author: Duane Johnson
# email: du... |
5136381 | How do I add a remote Git repository to an Ubuntu Server? | 49 | 2011-02-27 22:12:49 | <p>I have created a Git repository on my Desktop machine (Windows 7) with:</p>
<pre><code>git init
git add <all my files>
git commit -m "added my files"
</code></pre>
<p>Now I have installed a new Ubuntu Server 10.10 on a machine on my LAN and installed OpenSSH. My home directory is <code>/home/jonas</code> and... | 81,681 | 213,269 | 2018-10-16 13:21:58 | 5,136,451 | 33 | 2011-02-27 22:23:06 | 211,563 | 2013-12-28 01:15:22 | https://stackoverflow.com/q/5136381 | https://stackoverflow.com/a/5136451 | <p>Did you setup the repository on the remote server? You need to run</p>
<pre><code>mkdir -p /home/jonas/code/myproject.git
cd /home/jonas/code/myproject.git
git init --bare
</code></pre>
<p>on the server in order to set it up. I recommend taking a look at how to setup a git server in the free <a href="http://git-sc... | <p>Did you setup the repository on the remote server? You need to run</p> <pre><code>mkdir -p /home/jonas/code/myproject.git cd /home/jonas/code/myproject.git git init --bare </code></pre> <p>on the server in order to set it up. I recommend taking a look at how to setup a git server in the free <a href="http://git-sc... | 119, 386, 7330, 31598, 41346 | git, git-remote, repository, ssh, ubuntu-server | <h1>How do I add a remote Git repository to an Ubuntu Server?</h1>
<p>I have created a Git repository on my Desktop machine (Windows 7) with:</p>
<pre><code>git init
git add <all my files>
git commit -m "added my files"
</code></pre>
<p>Now I have installed a new Ubuntu Server 10.10 on a machine on my LAN and i... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 18,630 | git | # How do I add a remote Git repository to an Ubuntu Server?
I have created a Git repository on my Desktop machine (Windows 7) with:
```
git init
git add <all my files>
git commit -m "added my files"
```
Now I have installed a new Ubuntu Server 10.10 on a machine on my LAN and installed OpenSSH. My home directory is ... | Did you setup the repository on the remote server? You need to run
```
mkdir -p /home/jonas/code/myproject.git
cd /home/jonas/code/myproject.git
git init --bare
```
on the server in order to set it up. I recommend taking a look at how to setup a git server in the free [ProGit book](http://git-scm.com/book/ch4-2.html)... |
2087216 | Commit in git only if tests pass | 41 | 2010-01-18 15:47:51 | <p>I've recently started using git, and also begun unit testing (using Python's <code>unittest</code> module). I'd like to run my tests each time I commit, and only commit if they pass.</p>
<p>I'm guessing I need to use <code>pre-commit</code> in <code>/hooks</code>, and I've managed to make it run the tests, but I ca... | 13,361 | 49,376 | 2015-05-19 09:18:13 | 2,088,074 | 33 | 2010-01-18 17:54:41 | 69,755 | 2010-01-18 18:29:12 | https://stackoverflow.com/q/2087216 | https://stackoverflow.com/a/2088074 | <p>I would check to make sure that each step of the way, your script returns a non-zero exit code on failure. Check to see if your <code>python3.1 foo.py --test</code> returns a non-zero exit code if a test fails. Check to make sure your <code>make test</code> command returns a non-zero exit code. And finally, check th... | <p>I would check to make sure that each step of the way, your script returns a non-zero exit code on failure. Check to see if your <code>python3.1 foo.py --test</code> returns a non-zero exit code if a test fails. Check to make sure your <code>make test</code> command returns a non-zero exit code. And finally, check th... | 16, 119, 1931, 43087 | git, githooks, python, unit-testing | <h1>Commit in git only if tests pass</h1>
<p>I've recently started using git, and also begun unit testing (using Python's <code>unittest</code> module). I'd like to run my tests each time I commit, and only commit if they pass.</p>
<p>I'm guessing I need to use <code>pre-commit</code> in <code>/hooks</code>, and I've ... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 18,631 | git | # Commit in git only if tests pass
I've recently started using git, and also begun unit testing (using Python's `unittest` module). I'd like to run my tests each time I commit, and only commit if they pass.
I'm guessing I need to use `pre-commit` in `/hooks`, and I've managed to make it run the tests, but I can't see... | I would check to make sure that each step of the way, your script returns a non-zero exit code on failure. Check to see if your `python3.1 foo.py --test` returns a non-zero exit code if a test fails. Check to make sure your `make test` command returns a non-zero exit code. And finally, check that your `pre-commit` hook... |
29746958 | How to import from a Python file in Git submodule | 37 | 2015-04-20 11:44:09 | <p>I've a project which uses Git submodules. In my Python file, I want to use functions from another Python file in the submodule project.</p>
<p>In order to work, I had to add the <code>__init__.py</code> file to all subfolders in the path. My folder tree is the following:</p>
<pre><code>myproj
├── gitmodules
│ ├── ... | 34,152 | 4,398,050 | 2025-01-17 16:05:49 | 29,747,054 | 33 | 2015-04-20 11:48:39 | 1,725,553 | 2020-05-17 06:47:12 | https://stackoverflow.com/q/29746958 | https://stackoverflow.com/a/29747054 | <p>you can add to <code>sys.path</code> in the file you want to be able to access the module, something like:</p>
<pre><code>import sys
sys.path.append("/home/me/myproj/gitmodules")
import mygitsubmodule
</code></pre>
<p>This example is adding a path as a raw string to make it clear what's happening. You should reall... | <p>you can add to <code>sys.path</code> in the file you want to be able to access the module, something like:</p> <pre><code>import sys sys.path.append("/home/me/myproj/gitmodules") import mygitsubmodule </code></pre> <p>This example is adding a path as a raw string to make it clear what's happening. You should reall... | 16, 25450, 41612 | git-submodules, python, python-import | <h1>How to import from a Python file in Git submodule</h1>
<p>I've a project which uses Git submodules. In my Python file, I want to use functions from another Python file in the submodule project.</p>
<p>In order to work, I had to add the <code>__init__.py</code> file to all subfolders in the path. My folder tree is t... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 18,634 | git | # How to import from a Python file in Git submodule
I've a project which uses Git submodules. In my Python file, I want to use functions from another Python file in the submodule project.
In order to work, I had to add the `__init__.py` file to all subfolders in the path. My folder tree is the following:
```
myproj
... | you can add to `sys.path` in the file you want to be able to access the module, something like:
```
import sys
sys.path.append("/home/me/myproj/gitmodules")
import mygitsubmodule
```
This example is adding a path as a raw string to make it clear what's happening. You should really use the more sophisticated, system i... |
8111991 | Git is automatically merging changes from a different branch to master | 34 | 2011-11-13 13:51:29 | <p>I am having an issue with Git branching. Whenever I make changes to a branch, all those changes get reflected in master branch even though I haven't invoked explicit merge command.</p>
<p>For example,</p>
<p>I created a "dashboard" branch <code>git checkout -b dashboard</code></p>
<p>then I have made changes in o... | 11,862 | 157,324 | 2014-04-11 19:10:40 | 8,112,217 | 33 | 2011-11-13 14:27:28 | 112,968 | 2014-04-11 19:10:40 | https://stackoverflow.com/q/8111991 | https://stackoverflow.com/a/8112217 | <p>When you make changes, those changes only exist in your working tree up until to the point when you commit them.</p>
<p>When you switch branches, Git will carry changes in your worktree over to the new checkout. This is often helpful when you notice that you were working on the wrong branch.</p>
<p>There's even a ... | <p>When you make changes, those changes only exist in your working tree up until to the point when you commit them.</p> <p>When you switch branches, Git will carry changes in your worktree over to the new checkout. This is often helpful when you notice that you were working on the wrong branch.</p> <p>There's even a ... | 119, 76220 | git, git-branch | <h1>Git is automatically merging changes from a different branch to master</h1>
<p>I am having an issue with Git branching. Whenever I make changes to a branch, all those changes get reflected in master branch even though I haven't invoked explicit merge command.</p>
<p>For example,</p>
<p>I created a "dashboard" bra... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 18,636 | git | # Git is automatically merging changes from a different branch to master
I am having an issue with Git branching. Whenever I make changes to a branch, all those changes get reflected in master branch even though I haven't invoked explicit merge command.
For example,
I created a "dashboard" branch `git checkout -b da... | When you make changes, those changes only exist in your working tree up until to the point when you commit them.
When you switch branches, Git will carry changes in your worktree over to the new checkout. This is often helpful when you notice that you were working on the wrong branch.
There's even a [recent discussio... |
2663371 | Longitude and latitude value from IP address | 34 | 2010-04-18 18:25:30 | <p>Is it possible to get the longitude and latitude value from IP address in asp.net?
If it is possible, please let me know how can I get this.</p>
| 58,618 | 298,336 | 2015-03-06 22:24:57 | 2,672,946 | 33 | 2010-04-20 06:14:50 | 103,225 | 2010-04-20 08:22:16 | https://stackoverflow.com/q/2663371 | https://stackoverflow.com/a/2672946 | <p><b><a href="http://www.maxmind.com/app/geolitecity">MaxMind Geolite city</a> is free</b>. If it is not good enough, you can apparently upgrade to a more accurate paid-version. I can't speak for the quality of the paid version, as I have never used it.</p>
<p>If you like your SQL, download the <a href="http://geol... | <p><b><a href="http://www.maxmind.com/app/geolitecity">MaxMind Geolite city</a> is free</b>. If it is not good enough, you can apparently upgrade to a more accurate paid-version. I can't speak for the quality of the paid version, as I have never used it.</p> <p>If you like your SQL, download the <a href="http://geol... | 96, 10580, 20301 | asp.net, geolocation, latitude-longitude | <h1>Longitude and latitude value from IP address</h1>
<p>Is it possible to get the longitude and latitude value from IP address in asp.net?
If it is possible, please let me know how can I get this.</p>
| q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 18,637 | git | # Longitude and latitude value from IP address
Is it possible to get the longitude and latitude value from IP address in asp.net?
If it is possible, please let me know how can I get this. | **[MaxMind Geolite city](http://www.maxmind.com/app/geolitecity) is free**. If it is not good enough, you can apparently upgrade to a more accurate paid-version. I can't speak for the quality of the paid version, as I have never used it.
If you like your SQL, download the [CSV version](http://geolite.maxmind.com/downl... |
28849302 | Impact of large number of branches in a git repo? | 33 | 2015-03-04 08:04:17 | <p>Does anyone know what the impact is of a git repo that has a lot of branches (2000+)? Does git pull or git fetch slow down due to having that many branches? Please provide benchmarks if there is a difference.</p>
| 23,231 | 60,117 | 2024-01-18 16:55:31 | 28,850,641 | 33 | 2015-03-04 09:20:19 | 414,355 | 2015-03-04 09:20:19 | https://stackoverflow.com/q/28849302 | https://stackoverflow.com/a/28850641 | <p>As others have pointed out, branches and other refs are just files in the file system (except that's not quite true because of <a href="http://git-scm.com/docs/git-pack-refs" rel="noreferrer">packed refs</a>) and are pretty cheap, but that doesn't mean their number can't affect performance. See e.g. the <a href="htt... | <p>As others have pointed out, branches and other refs are just files in the file system (except that's not quite true because of <a href="http://git-scm.com/docs/git-pack-refs" rel="noreferrer">packed refs</a>) and are pretty cheap, but that doesn't mean their number can't affect performance. See e.g. the <a href="htt... | 119 | git | <h1>Impact of large number of branches in a git repo?</h1>
<p>Does anyone know what the impact is of a git repo that has a lot of branches (2000+)? Does git pull or git fetch slow down due to having that many branches? Please provide benchmarks if there is a difference.</p>
| q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 18,639 | git | # Impact of large number of branches in a git repo?
Does anyone know what the impact is of a git repo that has a lot of branches (2000+)? Does git pull or git fetch slow down due to having that many branches? Please provide benchmarks if there is a difference. | As others have pointed out, branches and other refs are just files in the file system (except that's not quite true because of [packed refs](http://git-scm.com/docs/git-pack-refs)) and are pretty cheap, but that doesn't mean their number can't affect performance. See e.g. the [Poor push performance with large number of... |
8730514 | Chaining git hooks | 33 | 2012-01-04 16:45:55 | <p>As many of you probably know, there can be only one hook type in git.
If two update hooks need to be evaluated. The git admin is left with two <em>unmanageable</em> solutions:</p>
<ol>
<li>Merge the hook scripts together</li>
<li>Manually chain them with an <code>exec</code></li>
</ol>
<p>I am looking for an eleg... | 5,219 | 258,689 | 2016-06-18 04:40:10 | 8,734,391 | 33 | 2012-01-04 21:35:10 | 258,689 | 2012-01-05 02:07:09 | https://stackoverflow.com/q/8730514 | https://stackoverflow.com/a/8734391 | <p>After further investigation and testing, here is a working solution:</p>
<p>create file <code>.git/hooks/hook-chain</code> as follows </p>
<pre><code>#!/bin/bash
#
# author: orefalo
hookname=`basename $0`
FILE=`mktemp`
trap 'rm -f $FILE' EXIT
cat - > $FILE
for hook in $GIT_DIR/hooks/$hookname.*
do
if te... | <p>After further investigation and testing, here is a working solution:</p> <p>create file <code>.git/hooks/hook-chain</code> as follows </p> <pre><code>#!/bin/bash # # author: orefalo hookname=`basename $0` FILE=`mktemp` trap 'rm -f $FILE' EXIT cat - > $FILE for hook in $GIT_DIR/hooks/$hookname.* do if te... | 119, 43087 | git, githooks | <h1>Chaining git hooks</h1>
<p>As many of you probably know, there can be only one hook type in git.
If two update hooks need to be evaluated. The git admin is left with two <em>unmanageable</em> solutions:</p>
<ol>
<li>Merge the hook scripts together</li>
<li>Manually chain them with an <code>exec</code></li>
</ol>
... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 18,641 | git | # Chaining git hooks
As many of you probably know, there can be only one hook type in git.
If two update hooks need to be evaluated. The git admin is left with two *unmanageable* solutions:
1. Merge the hook scripts together
2. Manually chain them with an `exec`
I am looking for an elegant solution (written in BASH)... | After further investigation and testing, here is a working solution:
create file `.git/hooks/hook-chain` as follows
```
#!/bin/bash
#
# author: orefalo
hookname=`basename $0`
FILE=`mktemp`
trap 'rm -f $FILE' EXIT
cat - > $FILE
for hook in $GIT_DIR/hooks/$hookname.*
do
if test -x "$hook"; then
# echo $ho... |
2588024 | How do I git-add with wildcards when ignored files are present? | 33 | 2010-04-06 20:24:26 | <p>I'm using msysgit on Windows 7 x64. I can't figure out how to tell Git to add a lot of files when there are some files that .gitignore might ignore. For example:</p>
<ol>
<li>Initialize a git repository.</li>
<li><p>Create a .gitignore with contents:</p>
<pre><code>*.foo
</code></pre></li>
<li><p>Create files "t... | 8,993 | 2,547 | 2015-01-31 22:08:01 | 2,588,090 | 33 | 2010-04-06 20:33:47 | 113,586 | 2010-04-06 21:06:15 | https://stackoverflow.com/q/2588024 | https://stackoverflow.com/a/2588090 | <p>Here <code>git add *</code> complains, but <code>git add .</code> does what is expected (1.7.0.4, Linux).</p>
<p>From <code>git-add(1)</code>:</p>
<blockquote>
<p>The git add command will not add
ignored files by default. If any
ignored files were explicitly
specified on the command line, git add
will f... | <p>Here <code>git add *</code> complains, but <code>git add .</code> does what is expected (1.7.0.4, Linux).</p> <p>From <code>git-add(1)</code>:</p> <blockquote> <p>The git add command will not add ignored files by default. If any ignored files were explicitly specified on the command line, git add will f... | 119 | git | <h1>How do I git-add with wildcards when ignored files are present?</h1>
<p>I'm using msysgit on Windows 7 x64. I can't figure out how to tell Git to add a lot of files when there are some files that .gitignore might ignore. For example:</p>
<ol>
<li>Initialize a git repository.</li>
<li><p>Create a .gitignore with ... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 18,642 | git | # How do I git-add with wildcards when ignored files are present?
I'm using msysgit on Windows 7 x64. I can't figure out how to tell Git to add a lot of files when there are some files that .gitignore might ignore. For example:
1. Initialize a git repository.
2. Create a .gitignore with contents:
```
*.foo
... | Here `git add *` complains, but `git add .` does what is expected (1.7.0.4, Linux).
From `git-add(1)`:
> The git add command will not add
> ignored files by default. If any
> ignored files were explicitly
> specified on the command line, git add
> will fail with a list of ignored
> files. Ignored files reached by
> d... |
62172468 | How can I exclude changes to the pipeline yaml file to trigger a build in azure devops? | 32 | 2020-06-03 12:07:38 | <p>Working with Azure devops, and piplines yaml files. There is a trigger on the develop branch. However, when I am saving changes to the yaml file, it triggers a new build.</p>
<p>This happens cause the change to the yaml file is a new commit, captured by the trigger.</p>
<p>So my question is, how can I exclude chan... | 42,423 | 4,985,746 | 2022-10-27 09:09:01 | 62,172,516 | 33 | 2020-06-03 12:10:31 | 1,945,525 | 2021-04-02 07:40:05 | https://stackoverflow.com/q/62172468 | https://stackoverflow.com/a/62172516 | <blockquote>
<p>You can specify file paths to include or exclude. Note that the wildcard syntax is different between branches/tags and file paths.</p>
</blockquote>
<pre><code># specific path build
trigger:
branches:
include:
- master
- releases/*
paths:
include:
- docs/*
exclude:
- docs... | <blockquote> <p>You can specify file paths to include or exclude. Note that the wildcard syntax is different between branches/tags and file paths.</p> </blockquote> <pre><code># specific path build trigger: branches: include: - master - releases/* paths: include: - docs/* exclude: - docs... | 119, 1852, 116537, 119596 | azure-devops, azure-pipelines, git, yaml | <h1>How can I exclude changes to the pipeline yaml file to trigger a build in azure devops?</h1>
<p>Working with Azure devops, and piplines yaml files. There is a trigger on the develop branch. However, when I am saving changes to the yaml file, it triggers a new build.</p>
<p>This happens cause the change to the yaml... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 18,643 | git | # How can I exclude changes to the pipeline yaml file to trigger a build in azure devops?
Working with Azure devops, and piplines yaml files. There is a trigger on the develop branch. However, when I am saving changes to the yaml file, it triggers a new build.
This happens cause the change to the yaml file is a new c... | > You can specify file paths to include or exclude. Note that the wildcard syntax is different between branches/tags and file paths.
```
# specific path build
trigger:
branches:
include:
- master
- releases/*
paths:
include:
- docs/*
exclude:
- docs/README.md
```
Source: [Build Azure R... |
19308790 | Git branch --merged / --no-merged and --squash option | 32 | 2013-10-11 01:19:23 | <p><code>git branch --merged</code> doesn't appear to play nicely with --squash. </p>
<p>If you do a normal <code>git merge</code>, then <code>git branch --merged</code> tells you which branches have been merged. This is not the case however if the --squash option is used, even though the resulting tree is the same.</... | 5,881 | 228,282 | 2017-01-23 11:13:45 | 19,309,568 | 33 | 2013-10-11 03:01:02 | 1,256,452 | 2013-10-11 03:01:02 | https://stackoverflow.com/q/19308790 | https://stackoverflow.com/a/19309568 | <p>You can't get there from here (as the fellow giving directions said). More precisely, it does not make sense.</p>
<p>The problem is that <code>git merge --squash</code> does not actually do a merge. Suppose your branch history looks like this, for instance (with branches <code>topic</code> and <code>devel</code>)... | <p>You can't get there from here (as the fellow giving directions said). More precisely, it does not make sense.</p> <p>The problem is that <code>git merge --squash</code> does not actually do a merge. Suppose your branch history looks like this, for instance (with branches <code>topic</code> and <code>devel</code>)... | 119, 717, 42532 | git, merge, squash | <h1>Git branch --merged / --no-merged and --squash option</h1>
<p><code>git branch --merged</code> doesn't appear to play nicely with --squash. </p>
<p>If you do a normal <code>git merge</code>, then <code>git branch --merged</code> tells you which branches have been merged. This is not the case however if the --squas... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 18,644 | git | # Git branch --merged / --no-merged and --squash option
`git branch --merged` doesn't appear to play nicely with --squash.
If you do a normal `git merge`, then `git branch --merged` tells you which branches have been merged. This is not the case however if the --squash option is used, even though the resulting tree i... | You can't get there from here (as the fellow giving directions said). More precisely, it does not make sense.
The problem is that `git merge --squash` does not actually do a merge. Suppose your branch history looks like this, for instance (with branches `topic` and `devel`):
```
H ⬅ I ⬅ J <-- topic
... |
60372852 | How to create pull request from command line? | 31 | 2020-02-24 09:27:38 | <p>When I'm done with my work, I add, commit and push the changes to the remote branch tracked by the curernt one. So the commands are as follows.</p>
<blockquote>
</blockquote>
<p>checkout donkey<br />
add .<br />
commit --message<br />
push</p>
<p>Now, I'd like to create a pull request. It doesn't matter to me if I r... | 107,257 | 1,525,840 | 2025-10-14 08:13:17 | 60,374,164 | 33 | 2020-02-24 10:43:36 | 1,256,452 | 2020-02-24 10:43:36 | https://stackoverflow.com/q/60372852 | https://stackoverflow.com/a/60374164 | <p>A <em>pull request</em> is a thing that GitHub, or Bitbucket, or some other web hosting service, provides. It is not part of Git itself.</p>
<p>The <code>git request-pull</code> command generates <em>email messages</em>. If email messages are the (or a) mechanism your hosting provider gives you to make a <em>pull... | <p>A <em>pull request</em> is a thing that GitHub, or Bitbucket, or some other web hosting service, provides. It is not part of Git itself.</p> <p>The <code>git request-pull</code> command generates <em>email messages</em>. If email messages are the (or a) mechanism your hosting provider gives you to make a <em>pull... | 119, 11225, 64512 | command-line-interface, git, pull-request | <h1>How to create pull request from command line?</h1>
<p>When I'm done with my work, I add, commit and push the changes to the remote branch tracked by the curernt one. So the commands are as follows.</p>
<blockquote>
</blockquote>
<p>checkout donkey<br />
add .<br />
commit --message<br />
push</p>
<p>Now, I'd like t... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 18,646 | git | # How to create pull request from command line?
When I'm done with my work, I add, commit and push the changes to the remote branch tracked by the curernt one. So the commands are as follows.
checkout donkey
add .
commit --message
push
Now, I'd like to create a pull request. It doesn't matter to me if I requ... | A *pull request* is a thing that GitHub, or Bitbucket, or some other web hosting service, provides. It is not part of Git itself.
The `git request-pull` command generates *email messages*. If email messages are the (or a) mechanism your hosting provider gives you to make a *pull request*, this could work. However, the... |
10157702 | Why did Git create a merge commit with no file changes? | 31 | 2012-04-14 21:58:49 | <p>I am collaboratively working on a project with someone, so we decided to use git. Unfortunately, we frequently code in locations with no internet, so we end up with something like this:</p>
<pre><code>origin/master: A---B---C
\
mylocalmaster: D---E---F
\
his... | 15,718 | 465,378 | 2016-08-15 20:28:19 | 10,157,776 | 33 | 2012-04-14 22:11:25 | 13,767 | 2012-04-14 22:11:25 | https://stackoverflow.com/q/10157702 | https://stackoverflow.com/a/10157776 | <p>You can omit creating <em>merge commits</em>, by using <em>rebase</em> instead of <em>merge</em>.</p>
<p>As @Dougal said, if you do <code>git fetch</code>, you can execute <code>git rebase</code> afterwards to change the base of your changes to the fetched <code>HEAD</code>.</p>
<p>Usually you create those unwante... | <p>You can omit creating <em>merge commits</em>, by using <em>rebase</em> instead of <em>merge</em>.</p> <p>As @Dougal said, if you do <code>git fetch</code>, you can execute <code>git rebase</code> afterwards to change the base of your changes to the fetched <code>HEAD</code>.</p> <p>Usually you create those unwante... | 119, 28897 | git, git-merge | <h1>Why did Git create a merge commit with no file changes?</h1>
<p>I am collaboratively working on a project with someone, so we decided to use git. Unfortunately, we frequently code in locations with no internet, so we end up with something like this:</p>
<pre><code>origin/master: A---B---C
\... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 18,647 | git | # Why did Git create a merge commit with no file changes?
I am collaboratively working on a project with someone, so we decided to use git. Unfortunately, we frequently code in locations with no internet, so we end up with something like this:
```
origin/master: A---B---C
\
mylocalmaster: ... | You can omit creating *merge commits*, by using *rebase* instead of *merge*.
As @Dougal said, if you do `git fetch`, you can execute `git rebase` afterwards to change the base of your changes to the fetched `HEAD`.
Usually you create those unwanted *merge commits*, by pulling from remote repository.
In that case you ... |
13777171 | Configuring git log to use mailmap by default | 30 | 2012-12-08 11:49:32 | <p>Is there a way to configure git log to use a mailmap file by default? Without having to specify a format (or an alias for one).</p>
| 6,811 | 180,416 | 2020-05-01 21:21:57 | 30,900,151 | 33 | 2015-06-17 18:58:47 | 253,699 | 2019-11-19 16:40:27 | https://stackoverflow.com/q/13777171 | https://stackoverflow.com/a/30900151 | <p>I have Git 2.4.1. If you set <code>log.mailmap</code> config to true, that will set it to work with <code>git log</code> also</p>
<pre><code>git config --global log.mailmap true
</code></pre>
| <p>I have Git 2.4.1. If you set <code>log.mailmap</code> config to true, that will set it to work with <code>git log</code> also</p> <pre><code>git config --global log.mailmap true </code></pre> | 119, 47913 | git, git-log | <h1>Configuring git log to use mailmap by default</h1>
<p>Is there a way to configure git log to use a mailmap file by default? Without having to specify a format (or an alias for one).</p>
| q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 18,648 | git | # Configuring git log to use mailmap by default
Is there a way to configure git log to use a mailmap file by default? Without having to specify a format (or an alias for one). | I have Git 2.4.1. If you set `log.mailmap` config to true, that will set it to work with `git log` also
```
git config --global log.mailmap true
``` |
21422782 | Prevent git from popping up gnome password box | 30 | 2014-01-29 05:23:24 | <p>I have not asked a question of this nature before, so this may not be the correct site for this.</p>
<p>I use the xfce terminal in drop-down mode connected to a hotkey. It closes when another window becomes active, which is just fine. What is not fine, however, is that when I use git and have it pull or push to an ... | 14,517 | 1,124,529 | 2017-06-02 21:37:17 | 21,423,400 | 33 | 2014-01-29 06:09:51 | 406,249 | 2016-05-12 21:35:32 | https://stackoverflow.com/q/21422782 | https://stackoverflow.com/a/21423400 | <p>It seems like git is probably using the <code>GIT_ASKPASS</code> or <code>SSH_ASKPASS</code> environment variables to figure out if it should use a separate program to prompt for passwords.</p>
<p>Try running <code>unset GIT_ASKPASS</code> or <code>unset SSH_ASKPASS</code>. Now try pushing or pulling from a git rep... | <p>It seems like git is probably using the <code>GIT_ASKPASS</code> or <code>SSH_ASKPASS</code> environment variables to figure out if it should use a separate program to prompt for passwords.</p> <p>Try running <code>unset GIT_ASKPASS</code> or <code>unset SSH_ASKPASS</code>. Now try pushing or pulling from a git rep... | 58, 119, 220, 642, 3294 | git, gnome, https, linux, passwords | <h1>Prevent git from popping up gnome password box</h1>
<p>I have not asked a question of this nature before, so this may not be the correct site for this.</p>
<p>I use the xfce terminal in drop-down mode connected to a hotkey. It closes when another window becomes active, which is just fine. What is not fine, however... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 18,649 | git | # Prevent git from popping up gnome password box
I have not asked a question of this nature before, so this may not be the correct site for this.
I use the xfce terminal in drop-down mode connected to a hotkey. It closes when another window becomes active, which is just fine. What is not fine, however, is that when I... | It seems like git is probably using the `GIT_ASKPASS` or `SSH_ASKPASS` environment variables to figure out if it should use a separate program to prompt for passwords.
Try running `unset GIT_ASKPASS` or `unset SSH_ASKPASS`. Now try pushing or pulling from a git repository. If that works, add the appropriate command to... |
3063097 | Remove commits before specific commit | 30 | 2010-06-17 15:27:43 | <p>Is there a way to remove all commits before a specified commit and use that commit as the initial?</p>
| 11,186 | null | 2016-10-27 10:16:33 | 3,063,486 | 33 | 2010-06-17 16:14:20 | 197,325 | 2010-06-17 16:36:12 | https://stackoverflow.com/q/3063097 | https://stackoverflow.com/a/3063486 | <p>Let's say the new oldest commit's hash is X and we can use "oldroot" and "newroot" temporarily:</p>
<pre><code>git checkout -b oldroot X
TREE=`git write-tree`
COMMIT=`echo "Killed history" | git commit-tree "$TREE"`
git checkout -b newroot "$COMMIT"
git rebase --onto newroot oldroot master
# repeat for other branch... | <p>Let's say the new oldest commit's hash is X and we can use "oldroot" and "newroot" temporarily:</p> <pre><code>git checkout -b oldroot X TREE=`git write-tree` COMMIT=`echo "Killed history" | git commit-tree "$TREE"` git checkout -b newroot "$COMMIT" git rebase --onto newroot oldroot master # repeat for other branch... | 119, 456 | git, version-control | <h1>Remove commits before specific commit</h1>
<p>Is there a way to remove all commits before a specified commit and use that commit as the initial?</p>
| q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 18,650 | git | # Remove commits before specific commit
Is there a way to remove all commits before a specified commit and use that commit as the initial? | Let's say the new oldest commit's hash is X and we can use "oldroot" and "newroot" temporarily:
```
git checkout -b oldroot X
TREE=`git write-tree`
COMMIT=`echo "Killed history" | git commit-tree "$TREE"`
git checkout -b newroot "$COMMIT"
git rebase --onto newroot oldroot master
# repeat for other branches than master... |
33175721 | How do I get git to ignore my csv files? | 29 | 2015-10-16 16:54:08 | <p>I want git to ignore my csv files. But, when I do <code>git status</code>, I see that the csv is in <code>"Changes not staged for commit"</code>. But, I swear I added it to the .gitignore file a while ago. In fact, when I look at the <code>.gitignore</code> file, I see that it is there!</p>
<pre><code>*.csv
</co... | 53,681 | 2,605,112 | 2018-10-16 20:07:41 | 33,175,799 | 33 | 2015-10-16 17:00:18 | 3,251,955 | 2015-10-16 17:00:18 | https://stackoverflow.com/q/33175721 | https://stackoverflow.com/a/33175799 | <p>Looks like the problem is that, the csv files are already tracked in a commit before, so even though you add <code>*.csv</code> the git will start tracking the previously tracked files. </p>
<p>You can solve this using <code>git rm --cached</code> option, discussed in detail <a href="https://stackoverflow.com/quest... | <p>Looks like the problem is that, the csv files are already tracked in a commit before, so even though you add <code>*.csv</code> the git will start tracking the previously tracked files. </p> <p>You can solve this using <code>git rm --cached</code> option, discussed in detail <a href="https://stackoverflow.com/quest... | 73, 119, 25056 | csv, git, gitignore | <h1>How do I get git to ignore my csv files?</h1>
<p>I want git to ignore my csv files. But, when I do <code>git status</code>, I see that the csv is in <code>"Changes not staged for commit"</code>. But, I swear I added it to the .gitignore file a while ago. In fact, when I look at the <code>.gitignore</code> file, ... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 18,651 | git | # How do I get git to ignore my csv files?
I want git to ignore my csv files. But, when I do `git status`, I see that the csv is in `"Changes not staged for commit"`. But, I swear I added it to the .gitignore file a while ago. In fact, when I look at the `.gitignore` file, I see that it is there!
```
*.csv
```
So, h... | Looks like the problem is that, the csv files are already tracked in a commit before, so even though you add `*.csv` the git will start tracking the previously tracked files.
You can solve this using `git rm --cached` option, discussed in detail [in this stackoverflow question](https://stackoverflow.com/questions/1139... |
29947825 | How does git store duplicate files? | 29 | 2015-04-29 15:12:46 | <p>We have a Git repository that contains SVM AI input data and results. Every time we run a new model, we create a new root folder for that model so that we can organize our results over time:</p>
<pre><code>/run1.0
/data
... 100 mb of data
/classification.csv
/results.csv
...
/run2.0
/data
... 200 ... | 9,954 | 1,245,647 | 2021-01-15 08:04:28 | 29,949,004 | 33 | 2015-04-29 16:04:49 | 1,419,175 | 2021-01-15 08:04:28 | https://stackoverflow.com/q/29947825 | https://stackoverflow.com/a/29949004 | <p>I am probably not going to explain this quite right but my understanding is that every commit stores only a tree structure representing the file structure of your project with pointers to the actual files which are stored in an objects sub folder. Git uses a SHA1 hash of the file contents to create the file name and... | <p>I am probably not going to explain this quite right but my understanding is that every commit stores only a tree structure representing the file structure of your project with pointers to the actual files which are stored in an objects sub folder. Git uses a SHA1 hash of the file contents to create the file name and... | 119 | git | <h1>How does git store duplicate files?</h1>
<p>We have a Git repository that contains SVM AI input data and results. Every time we run a new model, we create a new root folder for that model so that we can organize our results over time:</p>
<pre><code>/run1.0
/data
... 100 mb of data
/classification.csv
/r... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 18,652 | git | # How does git store duplicate files?
We have a Git repository that contains SVM AI input data and results. Every time we run a new model, we create a new root folder for that model so that we can organize our results over time:
```
/run1.0
/data
... 100 mb of data
/classification.csv
/results.csv
...
/ru... | I am probably not going to explain this quite right but my understanding is that every commit stores only a tree structure representing the file structure of your project with pointers to the actual files which are stored in an objects sub folder. Git uses a SHA1 hash of the file contents to create the file name and su... |
6058101 | In Git, how do I get a detailed list of file changes from one revision to another? | 29 | 2011-05-19 11:43:52 | <p>I use a Git repository on my server to version user data files sent to the server. I'm interested in getting a list of changed files between any two revisions.</p>
<p>I know about <code>git diff --name-only <rev1> <rev2></code>, but this only gives me a list of file names. I'm especially interested in r... | 10,143 | 390,581 | 2015-11-05 16:25:02 | 6,058,162 | 33 | 2011-05-19 11:48:35 | 6,309 | 2015-11-05 16:25:02 | https://stackoverflow.com/q/6058101 | https://stackoverflow.com/a/6058162 | <pre><code>git diff --name-status -C <rev1> <rev2>
</code></pre>
<p>should be closer to what you are looking for.</p>
<p><a href="http://git-scm.com/docs/git-diff" rel="noreferrer"><code>--name-status</code></a> would display the file names and their respective status:</p>
<pre><code>(A|C|D|M|R|T|U|X|B)
... | <pre><code>git diff --name-status -C <rev1> <rev2> </code></pre> <p>should be closer to what you are looking for.</p> <p><a href="http://git-scm.com/docs/git-diff" rel="noreferrer"><code>--name-status</code></a> would display the file names and their respective status:</p> <pre><code>(A|C|D|M|R|T|U|X|B) ... | 119, 4510, 24582 | file-listing, git, rename | <h1>In Git, how do I get a detailed list of file changes from one revision to another?</h1>
<p>I use a Git repository on my server to version user data files sent to the server. I'm interested in getting a list of changed files between any two revisions.</p>
<p>I know about <code>git diff --name-only <rev1> <... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 18,653 | git | # In Git, how do I get a detailed list of file changes from one revision to another?
I use a Git repository on my server to version user data files sent to the server. I'm interested in getting a list of changed files between any two revisions.
I know about `git diff --name-only <rev1> <rev2>`, but this only gives me... | ```
git diff --name-status -C <rev1> <rev2>
```
should be closer to what you are looking for.
[`--name-status`](http://git-scm.com/docs/git-diff) would display the file names and their respective status:
```
(A|C|D|M|R|T|U|X|B)
```
> Added (A), Copied (C), Deleted (D), Modified (M), Renamed (R),
> type (i.e. regu... |
55937975 | Can I "uninitialize" a git submodule? | 28 | 2019-05-01 14:39:12 | <p>I'm developing for an embedded project that has the Linux source tree as a submodule. I'm currently working on a non-development machine, so I'll never build with this repository; it's just for reference.</p>
<p>At one point I initialized the linux submodule (bringing in about 2.5GB of data), but now I want to reve... | 13,982 | 2,190,921 | 2019-05-01 16:42:11 | 55,938,260 | 33 | 2019-05-01 14:59:27 | 11,239,008 | 2019-05-01 16:42:11 | https://stackoverflow.com/q/55937975 | https://stackoverflow.com/a/55938260 | <p>The first three steps of the following are how you permanently delete a submodule; the fourth step will tell git to restore the module, but not to reinitialize it.</p>
<p>1) Remove the submodule entry from .git/config:<br>
<code>git submodule deinit -f path/to/submodule</code></p>
<p>2) Remove the submodule reposi... | <p>The first three steps of the following are how you permanently delete a submodule; the fourth step will tell git to restore the module, but not to reinitialize it.</p> <p>1) Remove the submodule entry from .git/config:<br> <code>git submodule deinit -f path/to/submodule</code></p> <p>2) Remove the submodule reposi... | 119, 41612 | git, git-submodules | <h1>Can I "uninitialize" a git submodule?</h1>
<p>I'm developing for an embedded project that has the Linux source tree as a submodule. I'm currently working on a non-development machine, so I'll never build with this repository; it's just for reference.</p>
<p>At one point I initialized the linux submodule (bringing ... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 18,654 | git | # Can I "uninitialize" a git submodule?
I'm developing for an embedded project that has the Linux source tree as a submodule. I'm currently working on a non-development machine, so I'll never build with this repository; it's just for reference.
At one point I initialized the linux submodule (bringing in about 2.5GB o... | The first three steps of the following are how you permanently delete a submodule; the fourth step will tell git to restore the module, but not to reinitialize it.
1) Remove the submodule entry from .git/config:
`git submodule deinit -f path/to/submodule`
2) Remove the submodule repository from the superproject's .... |
28696002 | undo git pull of wrong branch onto master | 28 | 2015-02-24 12:37:48 | <p>I have <strong>pulled from</strong> a different branch from the remote. The 2 branches are different yet the merge happened silently on my current branch. I am currently working on the "master" branch locally, and it has been updated with the changes of the remote branch - "FE_Changes". </p>
<p>How do I remove the ... | 23,918 | 120,481 | 2021-07-09 23:44:38 | 28,697,035 | 33 | 2015-02-24 13:26:29 | 1,863,229 | 2015-02-24 13:26:29 | https://stackoverflow.com/q/28696002 | https://stackoverflow.com/a/28697035 | <p><code>git reset --hard HEAD~1</code> <br/></p>
<p>This will nuke the most recent commit on your local branch. Assuming your pull strategy is merge, then there should only be one rogue commit on your local master branch. You mentioned that "the merge happened silently," so this should work in your case. Once you ... | <p><code>git reset --hard HEAD~1</code> <br/></p> <p>This will nuke the most recent commit on your local branch. Assuming your pull strategy is merge, then there should only be one rogue commit on your local master branch. You mentioned that "the merge happened silently," so this should work in your case. Once you ... | 119, 1879, 37230 | branch, git, git-checkout | <h1>undo git pull of wrong branch onto master</h1>
<p>I have <strong>pulled from</strong> a different branch from the remote. The 2 branches are different yet the merge happened silently on my current branch. I am currently working on the "master" branch locally, and it has been updated with the changes of the remote b... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 18,655 | git | # undo git pull of wrong branch onto master
I have **pulled from** a different branch from the remote. The 2 branches are different yet the merge happened silently on my current branch. I am currently working on the "master" branch locally, and it has been updated with the changes of the remote branch - "FE_Changes".
... | `git reset --hard HEAD~1`
This will nuke the most recent commit on your local branch. Assuming your pull strategy is merge, then there should only be one rogue commit on your local master branch. You mentioned that "the merge happened silently," so this should work in your case. Once you have fixed the master branch, ... |
2665045 | Can I tell git pull to overwrite instead of merge? | 28 | 2010-04-19 03:24:34 | <p>As far as I see, <code>git pull someRemote master</code> tries to merge the remote branch into mine.</p>
<p>Is there a way to say "Completely discard my stuff, just make me another clone of the remote" using git pull? I still want to keep my own repository and keep it's history, but I want to have a 1:1 copy of som... | 22,450 | 91 | 2017-03-03 11:32:45 | 2,665,084 | 33 | 2010-04-19 03:43:10 | 893 | 2010-04-19 03:43:10 | https://stackoverflow.com/q/2665045 | https://stackoverflow.com/a/2665084 | <p>First, rename your master branch to something else:</p>
<pre><code>git branch -m master my_old_master
</code></pre>
<p>Then, create a new master:</p>
<pre><code>git checkout -b master someRemote
</code></pre>
<p>The great thing about Git's branch names is that they aren't actual places themselves, they're just p... | <p>First, rename your master branch to something else:</p> <pre><code>git branch -m master my_old_master </code></pre> <p>Then, create a new master:</p> <pre><code>git checkout -b master someRemote </code></pre> <p>The great thing about Git's branch names is that they aren't actual places themselves, they're just p... | 119, 28896 | git, git-pull | <h1>Can I tell git pull to overwrite instead of merge?</h1>
<p>As far as I see, <code>git pull someRemote master</code> tries to merge the remote branch into mine.</p>
<p>Is there a way to say "Completely discard my stuff, just make me another clone of the remote" using git pull? I still want to keep my own repository... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 18,656 | git | # Can I tell git pull to overwrite instead of merge?
As far as I see, `git pull someRemote master` tries to merge the remote branch into mine.
Is there a way to say "Completely discard my stuff, just make me another clone of the remote" using git pull? I still want to keep my own repository and keep it's history, but... | First, rename your master branch to something else:
```
git branch -m master my_old_master
```
Then, create a new master:
```
git checkout -b master someRemote
```
The great thing about Git's branch names is that they aren't actual places themselves, they're just pointers to places (where a "place" is a SHA1 commit... |
9540757 | Getting list of SVN users for Subversion -> Git migration? | 27 | 2012-03-02 21:41:58 | <p>I've been looking over a few SVN -> Git migrations and they all mention getting a proper users list before migrating, specifically by using the command:</p>
<pre><code>svn log -q | grep -e '^r' | awk 'BEGIN { FS = "|" } ; { print $2 }' | sort | uniq
</code></pre>
<p>I have access to the Ubuntu server hosting the s... | 33,428 | 1,107,232 | 2023-02-01 01:56:49 | 9,541,281 | 33 | 2012-03-02 22:30:25 | 712,605 | 2023-02-01 01:56:49 | https://stackoverflow.com/q/9540757 | https://stackoverflow.com/a/9541281 | <p>Pass the path to the repository as a URL:</p>
<pre><code>svn log -q file:///var/subversion | grep -e '^r' | awk -F '|' '{ print $2 }' | sort | uniq
</code></pre>
<p>By the way, if you need the list of authors in chronological order of first commit (I found it helpful once when converting from svn to git), you can do... | <p>Pass the path to the repository as a URL:</p> <pre><code>svn log -q file:///var/subversion | grep -e '^r' | awk -F '|' '{ print $2 }' | sort | uniq </code></pre> <p>By the way, if you need the list of authors in chronological order of first commit (I found it helpful once when converting from svn to git), you can do... | 63, 119 | git, svn | <h1>Getting list of SVN users for Subversion -> Git migration?</h1>
<p>I've been looking over a few SVN -> Git migrations and they all mention getting a proper users list before migrating, specifically by using the command:</p>
<pre><code>svn log -q | grep -e '^r' | awk 'BEGIN { FS = "|" } ; { print $2 }' | sort | uni... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 18,658 | git | # Getting list of SVN users for Subversion -> Git migration?
I've been looking over a few SVN -> Git migrations and they all mention getting a proper users list before migrating, specifically by using the command:
```
svn log -q | grep -e '^r' | awk 'BEGIN { FS = "|" } ; { print $2 }' | sort | uniq
```
I have access... | Pass the path to the repository as a URL:
```
svn log -q file:///var/subversion | grep -e '^r' | awk -F '|' '{ print $2 }' | sort | uniq
```
By the way, if you need the list of authors in chronological order of first commit (I found it helpful once when converting from svn to git), you can do the following:
```
svn ... |
27955263 | how to open a .bundle file | 26 | 2015-01-15 01:04:51 | <p>I received <code>.bundle</code> file in my gmail. I was told that it was a git bundle file. I tried to open it in sublime and I got a bunch of what seemed to have looked like hex values. It is suppose to be instructions for a code challenge. I have a mac. Any help would be very appreciated!</p>
| 28,681 | 3,266,824 | 2022-02-28 11:37:39 | 27,977,250 | 33 | 2015-01-16 04:21:04 | 3,266,824 | 2022-02-28 11:37:39 | https://stackoverflow.com/q/27955263 | https://stackoverflow.com/a/27977250 | <p>I needed to initialize the Git repository and add <code>master</code> to the end of pull as shown below:</p>
<pre><code>git init
git pull file.bundle master
</code></pre>
| <p>I needed to initialize the Git repository and add <code>master</code> to the end of pull as shown below:</p> <pre><code>git init git pull file.bundle master </code></pre> | 119, 82677 | git, git-bundle | <h1>how to open a .bundle file</h1>
<p>I received <code>.bundle</code> file in my gmail. I was told that it was a git bundle file. I tried to open it in sublime and I got a bunch of what seemed to have looked like hex values. It is suppose to be instructions for a code challenge. I have a mac. Any help would be very ap... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 18,659 | git | # how to open a .bundle file
I received `.bundle` file in my gmail. I was told that it was a git bundle file. I tried to open it in sublime and I got a bunch of what seemed to have looked like hex values. It is suppose to be instructions for a code challenge. I have a mac. Any help would be very appreciated! | I needed to initialize the Git repository and add `master` to the end of pull as shown below:
```
git init
git pull file.bundle master
``` |
5186070 | How to start git daemon on Windows | 26 | 2011-03-03 20:18:25 | <p>How do I start the git daemon on Windows in order to allow it to begin serving requests? Seems like msysgit is supposed to install it as a Windows Service or something but I don't see one.</p>
| 29,917 | 389,103 | 2022-03-13 12:07:18 | 5,198,654 | 33 | 2011-03-04 20:03:37 | 291,641 | 2011-03-04 20:03:37 | https://stackoverflow.com/q/5186070 | https://stackoverflow.com/a/5198654 | <p>Git for Windows 1.7.4 includes support for git daemon on windows which was missing in previous versions. To export your repository you will need to create a file called git-daemon-export-ok in the .git directory or include the --export-all command line option.</p>
<p>In a git repository run:<code>git daemon --expor... | <p>Git for Windows 1.7.4 includes support for git daemon on windows which was missing in previous versions. To export your repository you will need to create a file called git-daemon-export-ok in the .git directory or include the --export-all command line option.</p> <p>In a git repository run:<code>git daemon --expor... | 64, 119, 31985 | git, windows, windows-server-2008 | <h1>How to start git daemon on Windows</h1>
<p>How do I start the git daemon on Windows in order to allow it to begin serving requests? Seems like msysgit is supposed to install it as a Windows Service or something but I don't see one.</p>
| q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 18,660 | git | # How to start git daemon on Windows
How do I start the git daemon on Windows in order to allow it to begin serving requests? Seems like msysgit is supposed to install it as a Windows Service or something but I don't see one. | Git for Windows 1.7.4 includes support for git daemon on windows which was missing in previous versions. To export your repository you will need to create a file called git-daemon-export-ok in the .git directory or include the --export-all command line option.
In a git repository run:`git daemon --export-all` and you ... |
3333255 | How to unpack packed-refs? | 25 | 2010-07-26 08:25:12 | <p>I cloned a project from github with <em>git clone --mirror</em>. That left me with a repository with a <em>packed-refs</em> file, a <em>.pack</em> and an <em>.idx</em> file. For developement purposes I want to look at the loose objects, so I unpacked the objects with <em>git unpack-objects < <pack file></em... | 28,482 | 219,324 | 2018-04-08 22:31:38 | 3,333,428 | 33 | 2010-07-26 08:58:32 | 90,835 | 2014-03-16 12:14:30 | https://stackoverflow.com/q/3333255 | https://stackoverflow.com/a/3333428 | <p>The short answer is "no" - there is no "easy way" to unpack the refs the way you're asking.</p>
<p>The slightly longer answer is, each ref is just a 41-byte text file (40 byte SHA1 in hex + newline) in a specific path, so the "hard" version just requires something like this in your <code>~/.gitconfig</code>:</p>
<... | <p>The short answer is "no" - there is no "easy way" to unpack the refs the way you're asking.</p> <p>The slightly longer answer is, each ref is just a 41-byte text file (40 byte SHA1 in hex + newline) in a specific path, so the "hard" version just requires something like this in your <code>~/.gitconfig</code>:</p> <... | 119, 1231 | command-line, git | <h1>How to unpack packed-refs?</h1>
<p>I cloned a project from github with <em>git clone --mirror</em>. That left me with a repository with a <em>packed-refs</em> file, a <em>.pack</em> and an <em>.idx</em> file. For developement purposes I want to look at the loose objects, so I unpacked the objects with <em>git unpac... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 18,663 | git | # How to unpack packed-refs?
I cloned a project from github with *git clone --mirror*. That left me with a repository with a *packed-refs* file, a *.pack* and an *.idx* file. For developement purposes I want to look at the loose objects, so I unpacked the objects with *git unpack-objects < <pack file>* which worked fi... | The short answer is "no" - there is no "easy way" to unpack the refs the way you're asking.
The slightly longer answer is, each ref is just a 41-byte text file (40 byte SHA1 in hex + newline) in a specific path, so the "hard" version just requires something like this in your `~/.gitconfig`:
```
[alias]
unpack-refs = ... |
61235175 | Git GUI for Windows' window is Missing and/or Invisible | 24 | 2020-04-15 17:44:04 | <p>The basic GUI that comes with the install of git: <a href="https://git-scm.com/download/win" rel="noreferrer">https://git-scm.com/download/win</a>; was working fine in Windows 10 until one day I used it on desktop 3, and then I must have switched desktops and closed it or something because now when I launch the GUI ... | 13,846 | 4,496,560 | 2025-11-21 18:25:40 | 61,235,176 | 33 | 2020-04-15 17:44:04 | 4,496,560 | 2021-04-20 16:35:11 | https://stackoverflow.com/q/61235175 | https://stackoverflow.com/a/61235176 | <p>So apparently the window does exist and no it's not invisible; it has just wandered off the screen.</p>
<p>There's a couple ways to solve this:
You can simply, right-click the task bar and choose any of the options: Cascade windows, Show windows stacked, or Show windows side by side.</p>
<p>However I prefer not to h... | <p>So apparently the window does exist and no it's not invisible; it has just wandered off the screen.</p> <p>There's a couple ways to solve this: You can simply, right-click the task bar and choose any of the options: Cascade windows, Show windows stacked, or Show windows side by side.</p> <p>However I prefer not to h... | 64, 33729 | git-gui, windows | <h1>Git GUI for Windows' window is Missing and/or Invisible</h1>
<p>The basic GUI that comes with the install of git: <a href="https://git-scm.com/download/win" rel="noreferrer">https://git-scm.com/download/win</a>; was working fine in Windows 10 until one day I used it on desktop 3, and then I must have switched deskt... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 18,664 | git | # Git GUI for Windows' window is Missing and/or Invisible
The basic GUI that comes with the install of git: <https://git-scm.com/download/win>; was working fine in Windows 10 until one day I used it on desktop 3, and then I must have switched desktops and closed it or something because now when I launch the GUI it app... | So apparently the window does exist and no it's not invisible; it has just wandered off the screen.
There's a couple ways to solve this:
You can simply, right-click the task bar and choose any of the options: Cascade windows, Show windows stacked, or Show windows side by side.
However I prefer not to have all my wind... |
42617683 | git rebase origin/develop vs git rebase develop | 24 | 2017-03-06 04:43:51 | <p>Let's assume the current branch is MyFeatureX. And the local <code>develop</code> branch is up-to-date with origin. Would the two statements below be equivalent?
What is the recommended syntax?</p>
<pre><code>git rebase origin/develop
git rebase develop
</code></pre>
<p>Please note: This <em>is not</em> the sam... | 78,554 | 657,067 | 2017-12-07 16:25:40 | 42,617,927 | 33 | 2017-03-06 05:06:14 | 743,464 | 2017-12-07 16:25:40 | https://stackoverflow.com/q/42617683 | https://stackoverflow.com/a/42617927 | <p>Your local branch <code>develop</code> <strong>tracks</strong> <code>origin/develop</code> and they might not always have the same commits in them.</p>
<pre><code>$ cat ~/.git/config
[remote "origin"]
url = git@something.com/repo.git
fetch = +refs/heads/*:refs/remotes/origin/*
</code></pre>
<p>This means ... | <p>Your local branch <code>develop</code> <strong>tracks</strong> <code>origin/develop</code> and they might not always have the same commits in them.</p> <pre><code>$ cat ~/.git/config [remote "origin"] url = git@something.com/repo.git fetch = +refs/heads/*:refs/remotes/origin/* </code></pre> <p>This means ... | 119, 29934 | git, git-rebase | <h1>git rebase origin/develop vs git rebase develop</h1>
<p>Let's assume the current branch is MyFeatureX. And the local <code>develop</code> branch is up-to-date with origin. Would the two statements below be equivalent?
What is the recommended syntax?</p>
<pre><code>git rebase origin/develop
git rebase develop
</... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 18,666 | git | # git rebase origin/develop vs git rebase develop
Let's assume the current branch is MyFeatureX. And the local `develop` branch is up-to-date with origin. Would the two statements below be equivalent?
What is the recommended syntax?
```
git rebase origin/develop
git rebase develop
```
Please note: This *is not* the... | Your local branch `develop` **tracks** `origin/develop` and they might not always have the same commits in them.
```
$ cat ~/.git/config
[remote "origin"]
url = git@something.com/repo.git
fetch = +refs/heads/*:refs/remotes/origin/*
```
This means we have a "remote" (a repository living somewhere else) arbitr... |
23027678 | warning: You ran 'git add' with neither '-A (--all)' or '--ignore-removal' | 24 | 2014-04-12 07:41:51 | <p>I tried to add my files to staging on another branch in git. Basically I have done the following</p>
<ol>
<li><code>git checkout -b <newBranch></code></li>
<li>Modified some files in that new branch</li>
<li>git add .</li>
</ol>
<p>But got the following warning (I have not found anything like this in SO and ... | 19,312 | 1,090,562 | 2020-06-10 04:19:40 | 23,027,730 | 33 | 2014-04-12 07:47:21 | 391,161 | 2014-04-12 07:47:21 | https://stackoverflow.com/q/23027678 | https://stackoverflow.com/a/23027730 | <p>It is saying that you should use either <code>git add -A</code> or <code>git add --ignore-removal .</code>, because <code>git add .</code> will have a different behavior in the newer version of git. Since it says the current version will ignore deleted paths, my best guess is that the next version will default to in... | <p>It is saying that you should use either <code>git add -A</code> or <code>git add --ignore-removal .</code>, because <code>git add .</code> will have a different behavior in the newer version of git. Since it says the current version will ignore deleted paths, my best guess is that the next version will default to in... | 119 | git | <h1>warning: You ran 'git add' with neither '-A (--all)' or '--ignore-removal'</h1>
<p>I tried to add my files to staging on another branch in git. Basically I have done the following</p>
<ol>
<li><code>git checkout -b <newBranch></code></li>
<li>Modified some files in that new branch</li>
<li>git add .</li>
</o... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 18,667 | git | # warning: You ran 'git add' with neither '-A (--all)' or '--ignore-removal'
I tried to add my files to staging on another branch in git. Basically I have done the following
1. `git checkout -b <newBranch>`
2. Modified some files in that new branch
3. git add .
But got the following warning (I have not found anythin... | It is saying that you should use either `git add -A` or `git add --ignore-removal .`, because `git add .` will have a different behavior in the newer version of git. Since it says the current version will ignore deleted paths, my best guess is that the next version will default to including them.
It wants you to be ex... |
19814800 | In Git how can I see the diff from master to develop? | 24 | 2013-11-06 14:33:30 | <p>In Git how can I see the diff from master to develop?</p>
<p>I want to see everything that is not the same of the two branchs</p>
| 24,431 | 2,860,433 | 2013-11-06 14:44:52 | 19,814,899 | 33 | 2013-11-06 14:38:20 | 1,264,909 | 2013-11-06 14:44:52 | https://stackoverflow.com/q/19814800 | https://stackoverflow.com/a/19814899 | <p>As explained in <a href="https://stackoverflow.com/a/822859/1264909">these</a> <a href="https://stackoverflow.com/a/822859/1264909">other</a> <a href="https://stackoverflow.com/a/9834872/1264909">answers</a>, you can do this by using <a href="https://www.kernel.org/pub/software/scm/git/docs/git-diff.html" rel="noref... | <p>As explained in <a href="https://stackoverflow.com/a/822859/1264909">these</a> <a href="https://stackoverflow.com/a/822859/1264909">other</a> <a href="https://stackoverflow.com/a/9834872/1264909">answers</a>, you can do this by using <a href="https://www.kernel.org/pub/software/scm/git/docs/git-diff.html" rel="noref... | 119 | git | <h1>In Git how can I see the diff from master to develop?</h1>
<p>In Git how can I see the diff from master to develop?</p>
<p>I want to see everything that is not the same of the two branchs</p>
| q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 18,668 | git | # In Git how can I see the diff from master to develop?
In Git how can I see the diff from master to develop?
I want to see everything that is not the same of the two branchs | As explained in [these](https://stackoverflow.com/a/822859/1264909) [other](https://stackoverflow.com/a/822859/1264909) [answers](https://stackoverflow.com/a/9834872/1264909), you can do this by using [`git-diff`](https://www.kernel.org/pub/software/scm/git/docs/git-diff.html) to:
- View all the differences:
```
... |
2278888 | Private git repository over http | 24 | 2010-02-17 07:07:23 | <p>can you recommend any no-brainer solution for setting up a git repository accessible via http(s, has cleutus suggested)? I have my own http server and I'd like to use it to host some minor private project. At home I can ssh it, but at work firewalls keep me from doing so.</p>
<p>Is there any free way to set up a sm... | 18,684 | 42,636 | 2025-02-20 10:23:27 | 2,278,948 | 33 | 2010-02-17 07:21:49 | 191,521 | 2010-02-17 07:21:49 | https://stackoverflow.com/q/2278888 | https://stackoverflow.com/a/2278948 | <p>Git supports this natively. You'll need an HTTP server, of course.</p>
<p>Put your (bare) repository in a folder that can be accessed by your web server. In that directory, run the following commands:</p>
<pre><code>$ git --bare update-server-info
$ mv hooks/post-update.sample hooks/post-update
</code></pre>
<p>T... | <p>Git supports this natively. You'll need an HTTP server, of course.</p> <p>Put your (bare) repository in a folder that can be accessed by your web server. In that directory, run the following commands:</p> <pre><code>$ git --bare update-server-info $ mv hooks/post-update.sample hooks/post-update </code></pre> <p>T... | 119, 5210 | git, http | <h1>Private git repository over http</h1>
<p>can you recommend any no-brainer solution for setting up a git repository accessible via http(s, has cleutus suggested)? I have my own http server and I'd like to use it to host some minor private project. At home I can ssh it, but at work firewalls keep me from doing so.</p... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 18,669 | git | # Private git repository over http
can you recommend any no-brainer solution for setting up a git repository accessible via http(s, has cleutus suggested)? I have my own http server and I'd like to use it to host some minor private project. At home I can ssh it, but at work firewalls keep me from doing so.
Is there a... | Git supports this natively. You'll need an HTTP server, of course.
Put your (bare) repository in a folder that can be accessed by your web server. In that directory, run the following commands:
```
$ git --bare update-server-info
$ mv hooks/post-update.sample hooks/post-update
```
The first command provides extra in... |
33802490 | How to see a merge history? | 23 | 2015-11-19 11:21:17 | <p>I'm using git but I'm not an expert with it.</p>
<p>I inherited a legacy project and it follows git flow (and I like it): each new feature in a <code>feature/name</code> branch. But when new features were merged into <code>develop</code> main branch they were not erased from <code>origin</code>. So that now in orig... | 42,365 | 433,685 | 2018-11-27 13:16:54 | 33,803,229 | 33 | 2015-11-19 11:54:26 | 5,535,550 | 2015-11-19 11:54:26 | https://stackoverflow.com/q/33802490 | https://stackoverflow.com/a/33803229 | <p>To get a history of merge commits made in the current branch, use the following command:</p>
<pre><code>git log --merges
</code></pre>
| <p>To get a history of merge commits made in the current branch, use the following command:</p> <pre><code>git log --merges </code></pre> | 119, 717 | git, merge | <h1>How to see a merge history?</h1>
<p>I'm using git but I'm not an expert with it.</p>
<p>I inherited a legacy project and it follows git flow (and I like it): each new feature in a <code>feature/name</code> branch. But when new features were merged into <code>develop</code> main branch they were not erased from <co... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 18,671 | git | # How to see a merge history?
I'm using git but I'm not an expert with it.
I inherited a legacy project and it follows git flow (and I like it): each new feature in a `feature/name` branch. But when new features were merged into `develop` main branch they were not erased from `origin`. So that now in origin I see a l... | To get a history of merge commits made in the current branch, use the following command:
```
git log --merges
``` |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.