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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
14251194 | How to recover after i execute :git reset --hard HEAD | 11 | 2013-01-10 05:11:09 | <p>I made a terrible mistake and execute "git reset --hard HEAD", all day's the local modification lost, how can i recover it? </p>
<p>Thanks millions</p>
| 9,212 | 1,861,935 | 2018-04-17 01:48:44 | 14,251,258 | 17 | 2013-01-10 05:18:31 | 148,870 | 2013-01-10 05:18:31 | https://stackoverflow.com/q/14251194 | https://stackoverflow.com/a/14251258 | <p>If you didn't already commit your local changes (or at least stage them via <code>git add</code>, they're gone. <code>git reset --hard</code> is a destructive operation for uncommitted changes.</p>
<p>If you did happen to stage them, but didn't commit them, try <code>git fsck --lost-found</code> and then search thr... | <p>If you didn't already commit your local changes (or at least stage them via <code>git add</code>, they're gone. <code>git reset --hard</code> is a destructive operation for uncommitted changes.</p> <p>If you did happen to stage them, but didn't commit them, try <code>git fsck --lost-found</code> and then search thr... | 119, 58338 | git, ios | <h1>How to recover after i execute :git reset --hard HEAD</h1>
<p>I made a terrible mistake and execute "git reset --hard HEAD", all day's the local modification lost, how can i recover it? </p>
<p>Thanks millions</p>
| q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 21,362 | git | # How to recover after i execute :git reset --hard HEAD
I made a terrible mistake and execute "git reset --hard HEAD", all day's the local modification lost, how can i recover it?
Thanks millions | If you didn't already commit your local changes (or at least stage them via `git add`, they're gone. `git reset --hard` is a destructive operation for uncommitted changes.
If you did happen to stage them, but didn't commit them, try `git fsck --lost-found` and then search through the contents of `.git/lost-found` - it... |
4030540 | Can I load one .gitconfig file from another? | 11 | 2010-10-27 06:30:38 | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="https://stackoverflow.com/questions/1557183/is-it-possible-to-include-a-file-in-your-gitconfig">Is it possible to include a file in your .gitconfig</a> </p>
</blockquote>
<p>With bash and zsh I can source subfiles in order to better organize my c... | 4,266 | 168,143 | 2012-03-16 08:25:37 | 9,733,336 | 17 | 2012-03-16 07:14:27 | 179,675 | 2012-03-16 07:14:27 | https://stackoverflow.com/q/4030540 | https://stackoverflow.com/a/9733336 | <p>(March 2012) It looks like this is finally going to be possible soon -- git 1.7.10 is going to support this syntax in <code>.gitconfig</code>:</p>
<pre><code>[include]
path = /path/to/file
</code></pre>
<p>See <a href="https://github.com/gitster/git/commit/9b25a0b52e09400719366f0a33d0d0da98bbf7b0" rel="norefer... | <p>(March 2012) It looks like this is finally going to be possible soon -- git 1.7.10 is going to support this syntax in <code>.gitconfig</code>:</p> <pre><code>[include] path = /path/to/file </code></pre> <p>See <a href="https://github.com/gitster/git/commit/9b25a0b52e09400719366f0a33d0d0da98bbf7b0" rel="norefer... | 119, 32868 | git, git-config | <h1>Can I load one .gitconfig file from another?</h1>
<blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="https://stackoverflow.com/questions/1557183/is-it-possible-to-include-a-file-in-your-gitconfig">Is it possible to include a file in your .gitconfig</a> </p>
</blockquote>
<p>With bash and zsh ... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 21,363 | git | # Can I load one .gitconfig file from another?
> **Possible Duplicate:**
> [Is it possible to include a file in your .gitconfig](https://stackoverflow.com/questions/1557183/is-it-possible-to-include-a-file-in-your-gitconfig)
With bash and zsh I can source subfiles in order to better organize my config.
Can I do so... | (March 2012) It looks like this is finally going to be possible soon -- git 1.7.10 is going to support this syntax in `.gitconfig`:
```
[include]
path = /path/to/file
```
See [here](https://github.com/gitster/git/commit/9b25a0b52e09400719366f0a33d0d0da98bbf7b0) for a detailed description of the git change and its... |
9197608 | Git, deleting repository | 11 | 2012-02-08 16:40:07 | <p>I somewhat screwd up the file system of my remote node. I am doing a project and the remote repo was initialized by my instructor. I cloned it and then pushed the updates from my home directory. </p>
<p>I now want to delete the repo which I cloned in the remote server. I want to start it over. </p>
<p>How do I del... | 41,752 | 1,115,545 | 2013-09-18 13:29:26 | 9,197,643 | 17 | 2012-02-08 16:42:25 | 113,586 | 2012-02-08 16:42:25 | https://stackoverflow.com/q/9197608 | https://stackoverflow.com/a/9197643 | <p>A repository is just a directory with working copy (though it is optional) and <code>.git</code>, so deleting the directory deletes the repository. To delete a remote repository you need to have access to the remote filesystem.</p>
| <p>A repository is just a directory with working copy (though it is optional) and <code>.git</code>, so deleting the directory deletes the repository. To delete a remote repository you need to have access to the remote filesystem.</p> | 119 | git | <h1>Git, deleting repository</h1>
<p>I somewhat screwd up the file system of my remote node. I am doing a project and the remote repo was initialized by my instructor. I cloned it and then pushed the updates from my home directory. </p>
<p>I now want to delete the repo which I cloned in the remote server. I want to st... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 21,364 | git | # Git, deleting repository
I somewhat screwd up the file system of my remote node. I am doing a project and the remote repo was initialized by my instructor. I cloned it and then pushed the updates from my home directory.
I now want to delete the repo which I cloned in the remote server. I want to start it over.
How... | A repository is just a directory with working copy (though it is optional) and `.git`, so deleting the directory deletes the repository. To delete a remote repository you need to have access to the remote filesystem. |
3161389 | Deleted a file by mistake, how to get from origin master? | 11 | 2010-07-01 20:23:25 | <p>I deleted a file on my desktop by mistake, how can I get it from the remote master?</p>
| 5,572 | 39,677 | 2016-02-23 00:39:02 | 3,161,403 | 17 | 2010-07-01 20:25:00 | 6,309 | 2010-07-01 20:38:58 | https://stackoverflow.com/q/3161389 | https://stackoverflow.com/a/3161403 | <pre><code>git checkout -- /path/to/file
</code></pre>
<p>should be enough to restore it, since you have a local repo with that file in it.<br>
That would restore your file at the version of the file present in the index.<br>
(i.e. the last version you ran <code>git add</code> on it).</p>
<p>To restore it at the late... | <pre><code>git checkout -- /path/to/file </code></pre> <p>should be enough to restore it, since you have a local repo with that file in it.<br> That would restore your file at the version of the file present in the index.<br> (i.e. the last version you ran <code>git add</code> on it).</p> <p>To restore it at the late... | 119 | git | <h1>Deleted a file by mistake, how to get from origin master?</h1>
<p>I deleted a file on my desktop by mistake, how can I get it from the remote master?</p>
| q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 21,365 | git | # Deleted a file by mistake, how to get from origin master?
I deleted a file on my desktop by mistake, how can I get it from the remote master? | ```
git checkout -- /path/to/file
```
should be enough to restore it, since you have a local repo with that file in it.
That would restore your file at the version of the file present in the index.
(i.e. the last version you ran `git add` on it).
To restore it at the latest commit of your current branch:
```
git... |
2997612 | How to export all changed/added files from Git? | 11 | 2010-06-08 13:18:24 | <p>I am very new to Git and I have a slight problem.</p>
<p>In SVN <em>[this feels like an Only Fools and Horses story by uncle Albert.."during the war..."]</em> when I wanted to update a production site with my latest changes, I'd do a diff in TSVN and export all the changed/added files between two revisions. As you ... | 12,866 | 78,928 | 2022-09-21 04:04:24 | 2,997,690 | 17 | 2010-06-08 13:28:59 | 119,963 | 2022-09-21 04:04:24 | https://stackoverflow.com/q/2997612 | https://stackoverflow.com/a/2997690 | <p>How do you want to export them? You say you already have a list; what more do you want? Supposing you're getting your list with <code>git diff --name-only ...</code></p>
<pre><code>git archive --output=<file> HEAD $(git diff --name-only ...)
tar -czf <file> $(git diff --name-only ...)
cp --parents $(gi... | <p>How do you want to export them? You say you already have a list; what more do you want? Supposing you're getting your list with <code>git diff --name-only ...</code></p> <pre><code>git archive --output=<file> HEAD $(git diff --name-only ...) tar -czf <file> $(git diff --name-only ...) cp --parents $(gi... | 119, 456, 21628, 31409 | git, msysgit, tortoisegit, version-control | <h1>How to export all changed/added files from Git?</h1>
<p>I am very new to Git and I have a slight problem.</p>
<p>In SVN <em>[this feels like an Only Fools and Horses story by uncle Albert.."during the war..."]</em> when I wanted to update a production site with my latest changes, I'd do a diff in TSVN and export a... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 21,366 | git | # How to export all changed/added files from Git?
I am very new to Git and I have a slight problem.
In SVN *[this feels like an Only Fools and Horses story by uncle Albert.."during the war..."]* when I wanted to update a production site with my latest changes, I'd do a diff in TSVN and export all the changed/added fi... | How do you want to export them? You say you already have a list; what more do you want? Supposing you're getting your list with `git diff --name-only ...`
```
git archive --output=<file> HEAD $(git diff --name-only ...)
tar -czf <file> $(git diff --name-only ...)
cp --parents $(git diff --name-only ...) <export-dire... |
1978107 | Git-Diff vs. Git-log? What's the difference? | 11 | 2009-12-30 02:33:14 | <p>I'm a little bit confused about Git. When I'm looking through the manual it appears the Diff is included in the Git-log manual. Also when I'm looking at tutorials and stuff, I find that Git log does much of the same stuff git-diff does. Is Git-Diff's functionality just a subset of Git-log?</p>
<p>Thanks!</p>
| 6,993 | 145,435 | 2011-12-19 20:18:25 | 1,978,123 | 17 | 2009-12-30 02:38:27 | 69,755 | 2009-12-30 03:22:42 | https://stackoverflow.com/q/1978107 | https://stackoverflow.com/a/1978123 | <p><code>git log</code> can use <code>git diff</code> to display each change in the history. <code>git log</code> is for displaying a set of revisions, potentially including the diff between each revision and its parent, while <code>git diff</code> is used for displaying the difference between any two revisions in your... | <p><code>git log</code> can use <code>git diff</code> to display each change in the history. <code>git log</code> is for displaying a set of revisions, potentially including the diff between each revision and its parent, while <code>git diff</code> is used for displaying the difference between any two revisions in your... | 119 | git | <h1>Git-Diff vs. Git-log? What's the difference?</h1>
<p>I'm a little bit confused about Git. When I'm looking through the manual it appears the Diff is included in the Git-log manual. Also when I'm looking at tutorials and stuff, I find that Git log does much of the same stuff git-diff does. Is Git-Diff's functionalit... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 21,367 | git | # Git-Diff vs. Git-log? What's the difference?
I'm a little bit confused about Git. When I'm looking through the manual it appears the Diff is included in the Git-log manual. Also when I'm looking at tutorials and stuff, I find that Git log does much of the same stuff git-diff does. Is Git-Diff's functionality just a ... | `git log` can use `git diff` to display each change in the history. `git log` is for displaying a set of revisions, potentially including the diff between each revision and its parent, while `git diff` is used for displaying the difference between any two revisions in your repository.
`git diff` can also be used to di... |
65963289 | Suspicious https://github.com/Homebrew/brew git origin remote found | 10 | 2021-01-30 00:00:13 | <p>The symptom of the problem is the following:</p>
<pre><code> ~ % brew install htop
Updating Homebrew...
==> Auto-updated Homebrew!
Updated 1 tap (homebrew/cask).
==> Updated Casks
Updated 2 casks.
==> Searching for similarly named formulae...
Error: No similarly named formulae found.
Error: No available fo... | 5,242 | 417,449 | 2021-01-31 15:53:18 | 65,981,126 | 17 | 2021-01-31 15:53:18 | 4,908,125 | 2021-01-31 15:53:18 | https://stackoverflow.com/q/65963289 | https://stackoverflow.com/a/65981126 | <p>I also encountered the above error on a fresh install of homebrew. I did the following and it fixed the warning:</p>
<pre><code>cd /usr/local/Homebrew/Library/Taps/homebrew/
rm -rf homebrew-core
git clone https://github.com/Homebrew/homebrew-core.git
</code></pre>
<p>And now <code>brew doctor</code> now gives <code... | <p>I also encountered the above error on a fresh install of homebrew. I did the following and it fixed the warning:</p> <pre><code>cd /usr/local/Homebrew/Library/Taps/homebrew/ rm -rf homebrew-core git clone https://github.com/Homebrew/homebrew-core.git </code></pre> <p>And now <code>brew doctor</code> now gives <code... | 119, 369, 1067 | git, homebrew, macos | <h1>Suspicious https://github.com/Homebrew/brew git origin remote found</h1>
<p>The symptom of the problem is the following:</p>
<pre><code> ~ % brew install htop
Updating Homebrew...
==> Auto-updated Homebrew!
Updated 1 tap (homebrew/cask).
==> Updated Casks
Updated 2 casks.
==> Searching for similarly named... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 21,369 | git | # Suspicious https://github.com/Homebrew/brew git origin remote found
The symptom of the problem is the following:
```
~ % brew install htop
Updating Homebrew...
==> Auto-updated Homebrew!
Updated 1 tap (homebrew/cask).
==> Updated Casks
Updated 2 casks.
==> Searching for similarly named formulae...
Error: No simil... | I also encountered the above error on a fresh install of homebrew. I did the following and it fixed the warning:
```
cd /usr/local/Homebrew/Library/Taps/homebrew/
rm -rf homebrew-core
git clone https://github.com/Homebrew/homebrew-core.git
```
And now `brew doctor` now gives `Your system is ready to brew`.
Hope this... |
42607033 | How to commit changes to git in Concourse build? | 10 | 2017-03-05 10:09:09 | <p>During Concourse build of Java application I want to:</p>
<ol>
<li>Checkout git <code>master</code> branch</li>
<li>Run <code>mvn package</code></li>
<li>If it was successful:
<ul>
<li>increment the <code>SNAPSHOT</code> version in Maven's <code>pom.xml</code></li>
<li>commit it back to the <code>master</code> bra... | 6,334 | 921,538 | 2017-03-06 18:12:09 | 42,632,670 | 17 | 2017-03-06 18:12:09 | 2,540,643 | 2017-03-06 18:12:09 | https://stackoverflow.com/q/42607033 | https://stackoverflow.com/a/42632670 | <p>You should make your commit inside of a task. </p>
<p>You do that by making a task which has your repo as an input, and declares a modified repo as an output. After cloning from input to output, change into your output folder, make your changes and commit.</p>
<p>Here's an example <code>pipeline.yml</code>:</p>
<... | <p>You should make your commit inside of a task. </p> <p>You do that by making a task which has your repo as an input, and declares a modified repo as an output. After cloning from input to output, change into your output folder, make your changes and commit.</p> <p>Here's an example <code>pipeline.yml</code>:</p> <... | 119, 120297 | concourse, git | <h1>How to commit changes to git in Concourse build?</h1>
<p>During Concourse build of Java application I want to:</p>
<ol>
<li>Checkout git <code>master</code> branch</li>
<li>Run <code>mvn package</code></li>
<li>If it was successful:
<ul>
<li>increment the <code>SNAPSHOT</code> version in Maven's <code>pom.xml</co... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 21,372 | git | # How to commit changes to git in Concourse build?
During Concourse build of Java application I want to:
1. Checkout git `master` branch
2. Run `mvn package`
3. If it was successful:
- increment the `SNAPSHOT` version in Maven's `pom.xml`
- commit it back to the `master` branch with `[skip ci]` commit message p... | You should make your commit inside of a task.
You do that by making a task which has your repo as an input, and declares a modified repo as an output. After cloning from input to output, change into your output folder, make your changes and commit.
Here's an example `pipeline.yml`:
```
resources:
- name: some-repo
... |
24183847 | How to remove an entry with null sha1 in a Git tree | 10 | 2014-06-12 12:00:18 | <p>I have inherited of a git repository with a null sha1 for a commit entry in a tree, preventing FishEye to index the repository.</p>
<pre><code>$ git fsck
Checking object directoriies: 100%(256/256), done.
warning in tree db22a67df70dc4ff90ec4cd666da91e9c2cb0d9:
contains entries pointing to null sha1
Checking ob... | 14,890 | 9,396 | 2021-05-27 01:35:06 | 24,228,418 | 17 | 2014-06-15 09:50:36 | null | 2018-02-13 19:14:15 | https://stackoverflow.com/q/24183847 | https://stackoverflow.com/a/24228418 | <p>The message you get suggests that there was only a single tree with a bad submodule. In that case, there is very little you have to clean up. You can create a new fixed tree that doesn't have this problem:</p>
<pre>
$ git ls-tree db22a67df70dc4ff90ec4cd666da91e9c2cb0d9 |
> sed -e '/0\{40\}/d' |
> git mktree
(new tr... | <p>The message you get suggests that there was only a single tree with a bad submodule. In that case, there is very little you have to clean up. You can create a new fixed tree that doesn't have this problem:</p> <pre> $ git ls-tree db22a67df70dc4ff90ec4cd666da91e9c2cb0d9 | > sed -e '/0\{40\}/d' | > git mktree (new tr... | 119, 46509, 88594 | atlassian-fisheye, git, git-filter-branch | <h1>How to remove an entry with null sha1 in a Git tree</h1>
<p>I have inherited of a git repository with a null sha1 for a commit entry in a tree, preventing FishEye to index the repository.</p>
<pre><code>$ git fsck
Checking object directoriies: 100%(256/256), done.
warning in tree db22a67df70dc4ff90ec4cd666da91e9c2... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 21,374 | git | # How to remove an entry with null sha1 in a Git tree
I have inherited of a git repository with a null sha1 for a commit entry in a tree, preventing FishEye to index the repository.
```
$ git fsck
Checking object directoriies: 100%(256/256), done.
warning in tree db22a67df70dc4ff90ec4cd666da91e9c2cb0d9:
contains ... | The message you get suggests that there was only a single tree with a bad submodule. In that case, there is very little you have to clean up. You can create a new fixed tree that doesn't have this problem:
```
$ git ls-tree db22a67df70dc4ff90ec4cd666da91e9c2cb0d9 |
> sed -e '/0\{40\}/d' |
> git mktree
(new tree SHA1 h... |
21894281 | The buildnumber-maven-plugin is returning UNKNOWN for the scmBranch | 10 | 2014-02-19 22:39:35 | <p>The buildnumber-maven-plugin is able to get the revision number from git and according to <a href="http://mojo.codehaus.org/buildnumber-maven-plugin/usage.html" rel="noreferrer">the meager documentation provided</a> it should be providing the branch as well in the <code>${scmBranch}</code> property. However, all I ... | 10,762 | 34,372 | 2016-07-28 03:09:14 | 21,902,598 | 17 | 2014-02-20 08:50:23 | 3,320,205 | 2016-07-28 03:09:14 | https://stackoverflow.com/q/21894281 | https://stackoverflow.com/a/21902598 | <p>Short answer the buildnumber plugin 1.2 <a href="https://github.com/mojohaus/buildnumber-maven-plugin/blob/buildnumber-maven-plugin-1.2/src/main/java/org/codehaus/mojo/build/CreateMojo.java" rel="noreferrer">doesn't print git branches</a>, so check out the <a href="https://github.com/alx3apps/jgit-buildnumber" rel="... | <p>Short answer the buildnumber plugin 1.2 <a href="https://github.com/mojohaus/buildnumber-maven-plugin/blob/buildnumber-maven-plugin-1.2/src/main/java/org/codehaus/mojo/build/CreateMojo.java" rel="noreferrer">doesn't print git branches</a>, so check out the <a href="https://github.com/alx3apps/jgit-buildnumber" rel="... | 119, 41127 | git, maven | <h1>The buildnumber-maven-plugin is returning UNKNOWN for the scmBranch</h1>
<p>The buildnumber-maven-plugin is able to get the revision number from git and according to <a href="http://mojo.codehaus.org/buildnumber-maven-plugin/usage.html" rel="noreferrer">the meager documentation provided</a> it should be providing t... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 21,375 | git | # The buildnumber-maven-plugin is returning UNKNOWN for the scmBranch
The buildnumber-maven-plugin is able to get the revision number from git and according to [the meager documentation provided](http://mojo.codehaus.org/buildnumber-maven-plugin/usage.html) it should be providing the branch as well in the `${scmBranch... | Short answer the buildnumber plugin 1.2 [doesn't print git branches](https://github.com/mojohaus/buildnumber-maven-plugin/blob/buildnumber-maven-plugin-1.2/src/main/java/org/codehaus/mojo/build/CreateMojo.java), so check out the [jgit-buildnumber](https://github.com/alx3apps/jgit-buildnumber) or [maven-git-commit-id](h... |
15258078 | Latitude / Longitude and meters | 10 | 2013-03-06 21:07:33 | <p>I have a small algorithmic problem.</p>
<p>I am developing an Android application. I get GPS coordinates. For example: latitude: <code>23.23907</code>, longitude: <code>50.45786</code>.</p>
<p>So I get a point. I want to compute bounds details on this point plus or minus 5 meters. I.e.:</p>
<pre><code>[23.23907 -... | 14,023 | 2,141,759 | 2020-07-21 05:38:13 | 15,265,549 | 17 | 2013-03-07 07:35:55 | 318,758 | 2013-03-11 13:18:14 | https://stackoverflow.com/q/15258078 | https://stackoverflow.com/a/15265549 | <p>The haversine formula can be simplified a great deal when you work in north-south and east-west directions only.</p>
<p>If Earth's circumference is C, the point at d kilometers to south of a given point is <strong>360*d/C</strong> degrees to the south. The point at d kilometers to east is <strong>360*d/(C*cos(latit... | <p>The haversine formula can be simplified a great deal when you work in north-south and east-west directions only.</p> <p>If Earth's circumference is C, the point at d kilometers to south of a given point is <strong>360*d/C</strong> degrees to the south. The point at d kilometers to east is <strong>360*d/(C*cos(latit... | 259, 1386, 6238, 20301 | android, distance, latitude-longitude, math | <h1>Latitude / Longitude and meters</h1>
<p>I have a small algorithmic problem.</p>
<p>I am developing an Android application. I get GPS coordinates. For example: latitude: <code>23.23907</code>, longitude: <code>50.45786</code>.</p>
<p>So I get a point. I want to compute bounds details on this point plus or minus 5 ... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 21,376 | git | # Latitude / Longitude and meters
I have a small algorithmic problem.
I am developing an Android application. I get GPS coordinates. For example: latitude: `23.23907`, longitude: `50.45786`.
So I get a point. I want to compute bounds details on this point plus or minus 5 meters. I.e.:
```
[23.23907 - 5 meters ; 23.... | The haversine formula can be simplified a great deal when you work in north-south and east-west directions only.
If Earth's circumference is C, the point at d kilometers to south of a given point is **360*d/C** degrees to the south. The point at d kilometers to east is **360*d/(C*cos(latitude))** degrees to the east. ... |
11968353 | Cannot push to remote git repository | 10 | 2012-08-15 11:17:35 | <p>So I have been having troubles pushing my most recent commits to a remote repository that I have set up on Bitbucket.</p>
<p>I am originally using Xcode, and have asked <a href="https://stackoverflow.com/questions/11963677/cant-push-to-git-repository"><strong>this question</strong></a> and was recommended to use ter... | 3,714 | 1,265,071 | 2012-08-16 17:14:33 | 11,970,181 | 17 | 2012-08-15 13:31:06 | 13,960 | 2012-08-15 13:31:06 | https://stackoverflow.com/q/11968353 | https://stackoverflow.com/a/11970181 | <p>Looks like you are trying to push a large delta and your <a href="http://flyingtomoon.com/2011/04/12/git-push-is-failed-due-to-rpc-failure-result56/" rel="noreferrer">push buffer is not big enough</a></p>
<p>Try this:</p>
<pre><code>git config http.postBuffer 524288000
</code></pre>
| <p>Looks like you are trying to push a large delta and your <a href="http://flyingtomoon.com/2011/04/12/git-push-is-failed-due-to-rpc-failure-result56/" rel="noreferrer">push buffer is not big enough</a></p> <p>Try this:</p> <pre><code>git config http.postBuffer 524288000 </code></pre> | 119, 391, 908 | git, terminal, xcode | <h1>Cannot push to remote git repository</h1>
<p>So I have been having troubles pushing my most recent commits to a remote repository that I have set up on Bitbucket.</p>
<p>I am originally using Xcode, and have asked <a href="https://stackoverflow.com/questions/11963677/cant-push-to-git-repository"><strong>this questi... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 21,377 | git | # Cannot push to remote git repository
So I have been having troubles pushing my most recent commits to a remote repository that I have set up on Bitbucket.
I am originally using Xcode, and have asked [**this question**](https://stackoverflow.com/questions/11963677/cant-push-to-git-repository) and was recommended to ... | Looks like you are trying to push a large delta and your [push buffer is not big enough](http://flyingtomoon.com/2011/04/12/git-push-is-failed-due-to-rpc-failure-result56/)
Try this:
```
git config http.postBuffer 524288000
``` |
7576207 | git: list all files with owner/identity at first commit (or rather, the first user to commit the file) | 10 | 2011-09-27 22:03:20 | <p>How do I, using git, list all files in a particular directory together with the owner/identity of those files at first commit? </p>
<p>Is getting slices of information like this across many files usually difficult?</p>
<p>Edit: Okay, git doesn't provide a direct way to do this, but it does store who commits vario... | 6,965 | 431,357 | 2021-02-04 17:47:17 | 7,576,974 | 17 | 2011-09-28 00:07:12 | 269,483 | 2021-02-04 17:47:17 | https://stackoverflow.com/q/7576207 | https://stackoverflow.com/a/7576974 | <p>Give this a try:</p>
<pre><code>$ cd thatdirectory
$ git ls-files |
while read fname; do
echo "`git log --reverse --format="%cn" "$fname" | head -1` first added $fname"
done
</code></pre>
<p>The "first added" can be misleading in case of renames.</p>
<p>Refs:</p>
<ul>
... | <p>Give this a try:</p> <pre><code>$ cd thatdirectory $ git ls-files | while read fname; do echo "`git log --reverse --format="%cn" "$fname" | head -1` first added $fname" done </code></pre> <p>The "first added" can be misleading in case of renames.</p> <p>Refs:</p> <ul> ... | 119 | git | <h1>git: list all files with owner/identity at first commit (or rather, the first user to commit the file)</h1>
<p>How do I, using git, list all files in a particular directory together with the owner/identity of those files at first commit? </p>
<p>Is getting slices of information like this across many files usually... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 21,379 | git | # git: list all files with owner/identity at first commit (or rather, the first user to commit the file)
How do I, using git, list all files in a particular directory together with the owner/identity of those files at first commit?
Is getting slices of information like this across many files usually difficult?
Edit:... | Give this a try:
```
$ cd thatdirectory
$ git ls-files |
while read fname; do
echo "`git log --reverse --format="%cn" "$fname" | head -1` first added $fname"
done
```
The "first added" can be misleading in case of renames.
Refs:
- <https://git-scm.com/docs/git-ls-files>
- <https://git-scm.com/docs/git-log#_... |
7387768 | Git: determine revision based on file contents | 10 | 2011-09-12 12:22:25 | <p>I have a file from a project that uses GIT as repository. For that file I need to find out to which revision this file belongs to. The file is stand-alone outside of an repository (not tracked) therefore the standard git commands do not work.</p>
<p>Is there a way to determine the revision this file belongs to only ... | 471 | 150,978 | 2021-12-30 14:16:15 | 7,387,905 | 17 | 2011-09-12 12:32:06 | 223,092 | 2011-09-12 12:38:22 | https://stackoverflow.com/q/7387768 | https://stackoverflow.com/a/7387905 | <p>I don't think there's a one-shot command to do this - git's object model makes it quite laborious to work back from a blob to commits that might reference it. Here's one way of doing it, though. First of all, find the hash of the file that git would use, with:</p>
<pre><code>git hash-object foo.c
</code></pre>
<... | <p>I don't think there's a one-shot command to do this - git's object model makes it quite laborious to work back from a blob to commits that might reference it. Here's one way of doing it, though. First of all, find the hash of the file that git would use, with:</p> <pre><code>git hash-object foo.c </code></pre> <... | 119, 1555 | git, revision | <h1>Git: determine revision based on file contents</h1>
<p>I have a file from a project that uses GIT as repository. For that file I need to find out to which revision this file belongs to. The file is stand-alone outside of an repository (not tracked) therefore the standard git commands do not work.</p>
<p>Is there a ... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 21,380 | git | # Git: determine revision based on file contents
I have a file from a project that uses GIT as repository. For that file I need to find out to which revision this file belongs to. The file is stand-alone outside of an repository (not tracked) therefore the standard git commands do not work.
Is there a way to determin... | I don't think there's a one-shot command to do this - git's object model makes it quite laborious to work back from a blob to commits that might reference it. Here's one way of doing it, though. First of all, find the hash of the file that git would use, with:
```
git hash-object foo.c
```
Suppose that returns `f414f... |
5593365 | Renaming files in git | 10 | 2011-04-08 09:51:16 | <p>I have two files checked into GitHub:</p>
<ol>
<li>index.html</li>
<li>backup.html</li>
</ol>
<p>Now I want to rename <code>backup.html</code> into <code>index.html</code> and vice versa. I don't really care about maintaining the change history for each file. How do I do this in Git?</p>
| 3,601 | 450,278 | 2020-04-24 00:37:07 | 5,593,380 | 17 | 2011-04-08 09:53:12 | 80,840 | 2011-04-08 10:01:42 | https://stackoverflow.com/q/5593365 | https://stackoverflow.com/a/5593380 | <p>This will contain the history:</p>
<pre><code>git mv backup.html backup2.html
git mv index.html backup.html
git mv backup2.html index.html
</code></pre>
<p>Without history just rename the file to your liking on your file system.</p>
| <p>This will contain the history:</p> <pre><code>git mv backup.html backup2.html git mv index.html backup.html git mv backup2.html index.html </code></pre> <p>Without history just rename the file to your liking on your file system.</p> | 119 | git | <h1>Renaming files in git</h1>
<p>I have two files checked into GitHub:</p>
<ol>
<li>index.html</li>
<li>backup.html</li>
</ol>
<p>Now I want to rename <code>backup.html</code> into <code>index.html</code> and vice versa. I don't really care about maintaining the change history for each file. How do I do this in Git?... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 21,381 | git | # Renaming files in git
I have two files checked into GitHub:
1. index.html
2. backup.html
Now I want to rename `backup.html` into `index.html` and vice versa. I don't really care about maintaining the change history for each file. How do I do this in Git? | This will contain the history:
```
git mv backup.html backup2.html
git mv index.html backup.html
git mv backup2.html index.html
```
Without history just rename the file to your liking on your file system. |
2710660 | Vim, LaTeX, word-wrapping, and version control | 10 | 2010-04-26 01:30:32 | <p>I'm writing a LaTeX document in vim, and I have it hard wrapping at 80 characters to make reading easier. However, this causes problems with tracking changes with in version control. For example, inserting "Lorem ipsum" at the beginning of this text:</p>
<blockquote>
<pre>1 Dolor sit amet, consectetur adipiscing ... | 3,739 | 44,476 | 2018-03-28 08:35:22 | 2,710,705 | 17 | 2010-04-26 01:48:21 | 176,922 | 2010-04-26 01:48:21 | https://stackoverflow.com/q/2710660 | https://stackoverflow.com/a/2710705 | <p>No need to introduce weird editing policies: the <code>git</code> feature you are looking for is using <code>git diff --color-words</code> to review changes.</p>
| <p>No need to introduce weird editing policies: the <code>git</code> feature you are looking for is using <code>git diff --color-words</code> to review changes.</p> | 119, 370, 456, 1704, 19508 | git, latex, version-control, vim, word-wrap | <h1>Vim, LaTeX, word-wrapping, and version control</h1>
<p>I'm writing a LaTeX document in vim, and I have it hard wrapping at 80 characters to make reading easier. However, this causes problems with tracking changes with in version control. For example, inserting "Lorem ipsum" at the beginning of this text:</p>
<bl... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 21,382 | git | # Vim, LaTeX, word-wrapping, and version control
I'm writing a LaTeX document in vim, and I have it hard wrapping at 80 characters to make reading easier. However, this causes problems with tracking changes with in version control. For example, inserting "Lorem ipsum" at the beginning of this text:
> ```
> 1 Dolor si... | No need to introduce weird editing policies: the `git` feature you are looking for is using `git diff --color-words` to review changes. |
64712857 | How to resolve "file location" conflicts during rebase using the suggested resolution? | 9 | 2020-11-06 10:27:18 | <pre><code>CONFLICT (file location): path/to/tests/NS/Domain/Projects/Foo/Bar/stories/workspace-public-channel-SOME_UUID.json added in HEAD inside a directory that was renamed in <some hash> (Reorganize tests), suggesting it should perhaps be moved to path/to/tests/unit/NS/Projects/Foo/Bar/stories/workspace-publi... | 10,398 | 1,885,442 | 2020-11-07 16:08:50 | 64,722,367 | 17 | 2020-11-06 22:22:56 | 1,256,452 | 2020-11-07 16:08:50 | https://stackoverflow.com/q/64712857 | https://stackoverflow.com/a/64722367 | <blockquote>
<p>What is the <strong>exact</strong> incantation to tell git to <strong>go ahead and do it</strong>?</p>
</blockquote>
<p>The form of the question suggests that there is only one command that is correct. That's not the case. <em>Any</em> set of Git commands that wind up with that file in Git's index und... | <blockquote> <p>What is the <strong>exact</strong> incantation to tell git to <strong>go ahead and do it</strong>?</p> </blockquote> <p>The form of the question suggests that there is only one command that is correct. That's not the case. <em>Any</em> set of Git commands that wind up with that file in Git's index und... | 119, 8974, 62599 | git, merge-conflict-resolution, rebase | <h1>How to resolve "file location" conflicts during rebase using the suggested resolution?</h1>
<pre><code>CONFLICT (file location): path/to/tests/NS/Domain/Projects/Foo/Bar/stories/workspace-public-channel-SOME_UUID.json added in HEAD inside a directory that was renamed in <some hash> (Reorganize tests), suggest... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 21,383 | git | # How to resolve "file location" conflicts during rebase using the suggested resolution?
```
CONFLICT (file location): path/to/tests/NS/Domain/Projects/Foo/Bar/stories/workspace-public-channel-SOME_UUID.json added in HEAD inside a directory that was renamed in <some hash> (Reorganize tests), suggesting it should perha... | > What is the **exact** incantation to tell git to **go ahead and do it**?
The form of the question suggests that there is only one command that is correct. That's not the case. *Any* set of Git commands that wind up with that file in Git's index under that pathname will suffice.
Based on what you have shown:
```
gi... |
53661818 | "fatal: Authentication failed" with git-credential-manager | 9 | 2018-12-07 00:56:00 | <p>I'm using Azure DevOps for the first time to host my next project. When I created an empty project on Azure Devops, I tried to clone it. While attempting to clone, it asked me for my password. I entered it and it says I have a wrong password but I know I'm typing my password correctly.</p>
<p>I then installed <stron... | 70,504 | 1,404,347 | 2022-04-20 16:49:30 | 53,664,088 | 17 | 2018-12-07 06:00:17 | 6,309 | 2021-07-08 20:49:02 | https://stackoverflow.com/q/53661818 | https://stackoverflow.com/a/53664088 | <p>Make sure your git credential helper is declared to your local Git:</p>
<pre><code>git config credential.helper
</code></pre>
<p>If the output is empty, type:</p>
<pre><code>git config --global credential.helper manager-core
</code></pre>
<p>Then try again.</p>
<p>However, the <a href="https://stackoverflow.com/user... | <p>Make sure your git credential helper is declared to your local Git:</p> <pre><code>git config credential.helper </code></pre> <p>If the output is empty, type:</p> <pre><code>git config --global credential.helper manager-core </code></pre> <p>Then try again.</p> <p>However, the <a href="https://stackoverflow.com/user... | 119, 14158, 116537, 132586 | azure, azure-devops, git, git-credential-manager | <h1>"fatal: Authentication failed" with git-credential-manager</h1>
<p>I'm using Azure DevOps for the first time to host my next project. When I created an empty project on Azure Devops, I tried to clone it. While attempting to clone, it asked me for my password. I entered it and it says I have a wrong password but I k... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 21,385 | git | # "fatal: Authentication failed" with git-credential-manager
I'm using Azure DevOps for the first time to host my next project. When I created an empty project on Azure Devops, I tried to clone it. While attempting to clone, it asked me for my password. I entered it and it says I have a wrong password but I know I'm t... | Make sure your git credential helper is declared to your local Git:
```
git config credential.helper
```
If the output is empty, type:
```
git config --global credential.helper manager-core
```
Then try again.
However, the [OP AskYous](https://stackoverflow.com/users/1404347/askyous) correctly pinpoint another iss... |
53275332 | How to use environment variables in init container args in kubernetes/openshift? | 9 | 2018-11-13 06:49:57 | <p>This is an excerpt of my deployment config:</p>
<pre><code>...
spec:
containers:
- env:
- name: GIT_USERNAME
valueFrom:
secretKeyRef:
key: username
name: git
- name: GIT_PASSWORD
valueFrom:
secretKeyRef:
key:... | 20,227 | 1,772,368 | 2018-11-13 08:05:35 | 53,275,841 | 17 | 2018-11-13 07:24:28 | 6,878,708 | 2018-11-13 08:05:35 | https://stackoverflow.com/q/53275332 | https://stackoverflow.com/a/53275841 | <p>Add environment variable in the init container.</p>
<pre><code>spec:
initContainers:
- args:
- clone
- '--single-branch'
- '--'
- 'https://$(GIT_USERNAME):$(GIT_PASSWORD)@someurl.com/something.git'
- '/testing/'
image: alpine/git
imagePullPolicy: Always
... | <p>Add environment variable in the init container.</p> <pre><code>spec: initContainers: - args: - clone - '--single-branch' - '--' - 'https://$(GIT_USERNAME):$(GIT_PASSWORD)@someurl.com/something.git' - '/testing/' image: alpine/git imagePullPolicy: Always ... | 119, 1364, 77738, 90304, 106338 | containers, docker, git, kubernetes, openshift | <h1>How to use environment variables in init container args in kubernetes/openshift?</h1>
<p>This is an excerpt of my deployment config:</p>
<pre><code>...
spec:
containers:
- env:
- name: GIT_USERNAME
valueFrom:
secretKeyRef:
key: username
name: git
... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 21,386 | git | # How to use environment variables in init container args in kubernetes/openshift?
This is an excerpt of my deployment config:
```
...
spec:
containers:
- env:
- name: GIT_USERNAME
valueFrom:
secretKeyRef:
key: username
name: git
- name: GIT_PASS... | Add environment variable in the init container.
```
spec:
initContainers:
- args:
- clone
- '--single-branch'
- '--'
- 'https://$(GIT_USERNAME):$(GIT_PASSWORD)@someurl.com/something.git'
- '/testing/'
image: alpine/git
imagePullPolicy: Always
name: init-c... |
48196850 | Cloning TFS repository using git-tfs | 9 | 2018-01-10 22:03:24 | <p>I'm trying to clone a GIT repository in TFS using git-tfs using TFS 2013</p>
<pre><code>git tfs clone http://servername:8080/tfs/DCM "$/Python"
</code></pre>
<p>Gives me:</p>
<pre><code>error: the path $/Python you want to clone doesn't exist!
</code></pre>
<p>"DCM" is the name of the collection and "Python" is ... | 27,179 | 2,088,886 | 2022-01-12 12:47:40 | 48,197,718 | 17 | 2018-01-10 23:27:27 | 717,372 | 2020-11-30 14:07:49 | https://stackoverflow.com/q/48196850 | https://stackoverflow.com/a/48197718 | <p>As the main developer of "git-tfs", I'm very pleased you absolutely want to use it! But there is no need of it here ;-)</p>
<p>The repository you want to clone is already a git repository (see the small red git icon like the one in the <a href="https://git-scm.com/" rel="noreferrer">git website</a>).</p>
<... | <p>As the main developer of "git-tfs", I'm very pleased you absolutely want to use it! But there is no need of it here ;-)</p> <p>The repository you want to clone is already a git repository (see the small red git icon like the one in the <a href="https://git-scm.com/" rel="noreferrer">git website</a>).</p> <... | 119, 733, 66446 | git, git-tfs, tfs | <h1>Cloning TFS repository using git-tfs</h1>
<p>I'm trying to clone a GIT repository in TFS using git-tfs using TFS 2013</p>
<pre><code>git tfs clone http://servername:8080/tfs/DCM "$/Python"
</code></pre>
<p>Gives me:</p>
<pre><code>error: the path $/Python you want to clone doesn't exist!
</code></pre>
<p>"DCM" ... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 21,387 | git | # Cloning TFS repository using git-tfs
I'm trying to clone a GIT repository in TFS using git-tfs using TFS 2013
```
git tfs clone http://servername:8080/tfs/DCM "$/Python"
```
Gives me:
```
error: the path $/Python you want to clone doesn't exist!
```
"DCM" is the name of the collection and "Python" is the name of... | As the main developer of "git-tfs", I'm very pleased you absolutely want to use it! But there is no need of it here ;-)
The repository you want to clone is already a git repository (see the small red git icon like the one in the [git website](https://git-scm.com/)).
git-tfs is a bridge tool to be able to import a TFV... |
23437768 | Should Symfony's 'bin' directory be ignored by git? | 9 | 2014-05-02 22:17:30 | <p>Running <code>composer install</code> in a Symfony Standard Edition application with a requirement for Doctrine will add a folder called 'bin'. The folder is configured in <code>composer.json</code>:</p>
<pre><code>"config": {
"bin-dir": "bin"
}
</code></pre>
<p>The <code>.gitignore</code> file <a href="https:... | 5,649 | 1,001,110 | 2023-03-07 12:52:56 | 43,546,083 | 17 | 2017-04-21 15:04:57 | 1,001,110 | 2023-03-07 12:52:56 | https://stackoverflow.com/q/23437768 | https://stackoverflow.com/a/43546083 | <h2>Symfony 3 and later</h2>
<p>In the Symfony 3 Standard Edition, the purpose of the <code>bin</code> directory has been slightly changed. Binaries from Composer packages (such as <code>phpunit</code>) are no longer installed in the <code>bin</code> directory, but in <code>vendor/bin</code>. Instead, the <code>bin</co... | <h2>Symfony 3 and later</h2> <p>In the Symfony 3 Standard Edition, the purpose of the <code>bin</code> directory has been slightly changed. Binaries from Composer packages (such as <code>phpunit</code>) are no longer installed in the <code>bin</code> directory, but in <code>vendor/bin</code>. Instead, the <code>bin</co... | 25056, 57799 | gitignore, symfony | <h1>Should Symfony's 'bin' directory be ignored by git?</h1>
<p>Running <code>composer install</code> in a Symfony Standard Edition application with a requirement for Doctrine will add a folder called 'bin'. The folder is configured in <code>composer.json</code>:</p>
<pre><code>"config": {
"bin-dir": "bin"
}
</cod... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 21,389 | git | # Should Symfony's 'bin' directory be ignored by git?
Running `composer install` in a Symfony Standard Edition application with a requirement for Doctrine will add a folder called 'bin'. The folder is configured in `composer.json`:
```
"config": {
"bin-dir": "bin"
}
```
The `.gitignore` file [that comes with the... | ## Symfony 3 and later
In the Symfony 3 Standard Edition, the purpose of the `bin` directory has been slightly changed. Binaries from Composer packages (such as `phpunit`) are no longer installed in the `bin` directory, but in `vendor/bin`. Instead, the `bin` directory contains the `console` and optionally some other ... |
31178662 | In git, obtain commits using git log with path | 9 | 2015-07-02 07:55:55 | <p>I would like to obtain the last 10 commits using git log specifying the path of my repository. I used the option <code>-path</code> but I have "is outside repository" error</p>
<pre><code> git log --no-merges -10 -p /home/my_folder/git/repo
fatal: /home/my_folder/git/repo: '/home/my_folder/git/repo' is o... | 5,290 | 3,472,065 | 2022-04-14 21:21:57 | 31,179,120 | 17 | 2015-07-02 08:16:49 | 279,627 | 2015-07-02 08:16:49 | https://stackoverflow.com/q/31178662 | https://stackoverflow.com/a/31179120 | <p>Git assumes that the current working directory is inside the repository you want to operate on. When running a git command from outside the repository directory hierarchy, you can use the global <code>-C</code> option to git to specify which repository to use:</p>
<pre><code>git -C /home/my_folder/git/repo log --n... | <p>Git assumes that the current working directory is inside the repository you want to operate on. When running a git command from outside the repository directory hierarchy, you can use the global <code>-C</code> option to git to specify which repository to use:</p> <pre><code>git -C /home/my_folder/git/repo log --n... | 119, 6268, 47913, 53850 | git, git-commit, git-log, path | <h1>In git, obtain commits using git log with path</h1>
<p>I would like to obtain the last 10 commits using git log specifying the path of my repository. I used the option <code>-path</code> but I have "is outside repository" error</p>
<pre><code> git log --no-merges -10 -p /home/my_folder/git/repo
fatal: /... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 21,390 | git | # In git, obtain commits using git log with path
I would like to obtain the last 10 commits using git log specifying the path of my repository. I used the option `-path` but I have "is outside repository" error
```
git log --no-merges -10 -p /home/my_folder/git/repo
fatal: /home/my_folder/git/repo: '/home/my_folde... | Git assumes that the current working directory is inside the repository you want to operate on. When running a git command from outside the repository directory hierarchy, you can use the global `-C` option to git to specify which repository to use:
```
git -C /home/my_folder/git/repo log --no-merges -10 -p
```
Usual... |
29711728 | How to Sort Geo-points according to the distance from current location in Android | 9 | 2015-04-18 01:08:01 | <p>I have a "Place" object with a LatLng coordinate for each:</p>
<pre><code>import com.google.android.gms.maps.model.LatLng;
public class Place{
public String name;
public LatLng latlng;
public Restaurant(String name, LatLng latlng) {
this.name = name;
this.latlng = latlng;
}
}
</cod... | 17,593 | 1,282,637 | 2018-03-04 04:48:14 | 29,713,656 | 17 | 2015-04-18 06:12:36 | 4,409,409 | 2015-04-18 06:31:59 | https://stackoverflow.com/q/29711728 | https://stackoverflow.com/a/29713656 | <p>Taking the algorithm from <a href="https://stackoverflow.com/questions/5396286/sort-list-of-lon-lat-points-start-with-nearest/5396425#5396425">this answer</a> from the question posted by @shieldstroy, that uses the <a href="http://en.wikipedia.org/wiki/Great-circle_distance" rel="noreferrer">Great Circle Distance</a... | <p>Taking the algorithm from <a href="https://stackoverflow.com/questions/5396286/sort-list-of-lon-lat-points-start-with-nearest/5396425#5396425">this answer</a> from the question posted by @shieldstroy, that uses the <a href="http://en.wikipedia.org/wiki/Great-circle_distance" rel="noreferrer">Great Circle Distance</a... | 1386, 10580, 20301 | android, geolocation, latitude-longitude | <h1>How to Sort Geo-points according to the distance from current location in Android</h1>
<p>I have a "Place" object with a LatLng coordinate for each:</p>
<pre><code>import com.google.android.gms.maps.model.LatLng;
public class Place{
public String name;
public LatLng latlng;
public Restaurant(String n... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 21,391 | git | # How to Sort Geo-points according to the distance from current location in Android
I have a "Place" object with a LatLng coordinate for each:
```
import com.google.android.gms.maps.model.LatLng;
public class Place{
public String name;
public LatLng latlng;
public Restaurant(String name, LatLng latlng) ... | Taking the algorithm from [this answer](https://stackoverflow.com/questions/5396286/sort-list-of-lon-lat-points-start-with-nearest/5396425#5396425) from the question posted by @shieldstroy, that uses the [Great Circle Distance](http://en.wikipedia.org/wiki/Great-circle_distance), I got this example working.
Here is th... |
28306508 | git remove all files except some files | 9 | 2015-02-03 18:49:22 | <p>I am trying to remove all files from a git branch except 1 file</p>
<pre><code># this removes all files
git rm -rf .
# what should i use to do somthing like that
git rm -rf . --except file1 file2
</code></pre>
| 9,730 | 1,508,904 | 2015-02-03 18:51:47 | 28,306,535 | 17 | 2015-02-03 18:51:47 | 279,627 | 2015-02-03 18:51:47 | https://stackoverflow.com/q/28306508 | https://stackoverflow.com/a/28306535 | <p>If you don't have any local changes in the files you want to keep, it's easiest to first remove all files, and then add the ones back you want to keep:</p>
<pre><code>git rm -rf .
git checkout HEAD -- file1 file2
</code></pre>
<p>If you do have local changes, commit or stash them first.</p>
| <p>If you don't have any local changes in the files you want to keep, it's easiest to first remove all files, and then add the ones back you want to keep:</p> <pre><code>git rm -rf . git checkout HEAD -- file1 file2 </code></pre> <p>If you do have local changes, commit or stash them first.</p> | 119 | git | <h1>git remove all files except some files</h1>
<p>I am trying to remove all files from a git branch except 1 file</p>
<pre><code># this removes all files
git rm -rf .
# what should i use to do somthing like that
git rm -rf . --except file1 file2
</code></pre>
| q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 21,392 | git | # git remove all files except some files
I am trying to remove all files from a git branch except 1 file
```
# this removes all files
git rm -rf .
# what should i use to do somthing like that
git rm -rf . --except file1 file2
``` | If you don't have any local changes in the files you want to keep, it's easiest to first remove all files, and then add the ones back you want to keep:
```
git rm -rf .
git checkout HEAD -- file1 file2
```
If you do have local changes, commit or stash them first. |
24628522 | How can I view the history of a single branch in EGit for eclipse | 9 | 2014-07-08 09:39:54 | <p>When reviewing code in eclipse using EGit plugin, before merging it to the develop branch, you switch to the branch and see what files changed with the commits on that branch. For this I would like to see -only- the commits to the current checked out branch. When using Team -> Show in History, I get the complete his... | 21,005 | 1,514,047 | 2017-09-29 15:27:44 | 24,632,349 | 17 | 2014-07-08 12:50:51 | 6,309 | 2017-09-29 15:27:44 | https://stackoverflow.com/q/24628522 | https://stackoverflow.com/a/24632349 | <p>You can check the filter button in the <a href="http://wiki.eclipse.org/EGit/User_Guide#History_View" rel="noreferrer">History View</a>:</p>
<blockquote>
<p>All Branches</p>
</blockquote>
<p><a href="https://i.sstatic.net/pDQXg.png" rel="noreferrer"><img src="https://i.sstatic.net/pDQXg.png" alt="http://wiki.ecl... | <p>You can check the filter button in the <a href="http://wiki.eclipse.org/EGit/User_Guide#History_View" rel="noreferrer">History View</a>:</p> <blockquote> <p>All Branches</p> </blockquote> <p><a href="https://i.sstatic.net/pDQXg.png" rel="noreferrer"><img src="https://i.sstatic.net/pDQXg.png" alt="http://wiki.ecl... | 53, 119, 43702 | eclipse, egit, git | <h1>How can I view the history of a single branch in EGit for eclipse</h1>
<p>When reviewing code in eclipse using EGit plugin, before merging it to the develop branch, you switch to the branch and see what files changed with the commits on that branch. For this I would like to see -only- the commits to the current che... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 21,393 | git | # How can I view the history of a single branch in EGit for eclipse
When reviewing code in eclipse using EGit plugin, before merging it to the develop branch, you switch to the branch and see what files changed with the commits on that branch. For this I would like to see -only- the commits to the current checked out ... | You can check the filter button in the [History View](http://wiki.eclipse.org/EGit/User_Guide#History_View):
> All Branches
[](https://i.sstatic.net/pDQXg.png)
> This toggle activates the "`All Branches`" mod... |
18922702 | Git Pull Doesn't Do A Git Fetch | 9 | 2013-09-20 17:37:00 | <p>My understanding has always been that <code>git pull</code> is essentially a combination of <code>git fetch</code> and <code>git merge ...</code> but I have encountered it a number of times where pulling, then comparing shows changes that aren't mine until I also do a fetch:</p>
<p>(on branch blob):</p>
<pre><code... | 6,468 | 2,800,158 | 2013-09-20 19:19:28 | 18,924,297 | 17 | 2013-09-20 19:19:28 | 2,755,919 | 2013-09-20 19:19:28 | https://stackoverflow.com/q/18922702 | https://stackoverflow.com/a/18924297 | <p>This is a common source of confusion, so much so that the <code>#git</code> IRC channel has a canned help text for it, called <code>!pull4</code>:</p>
<blockquote>
<p>We recommend against using 'git fetch/pull <remote> <refspec>' (i.e. with branch argument), because it doesn't update the <remote>/<bra... | <p>This is a common source of confusion, so much so that the <code>#git</code> IRC channel has a canned help text for it, called <code>!pull4</code>:</p> <blockquote> <p>We recommend against using 'git fetch/pull <remote> <refspec>' (i.e. with branch argument), because it doesn't update the <remote>/<bra... | 119, 4860, 18283 | fetch, git, pull | <h1>Git Pull Doesn't Do A Git Fetch</h1>
<p>My understanding has always been that <code>git pull</code> is essentially a combination of <code>git fetch</code> and <code>git merge ...</code> but I have encountered it a number of times where pulling, then comparing shows changes that aren't mine until I also do a fetch:<... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 21,395 | git | # Git Pull Doesn't Do A Git Fetch
My understanding has always been that `git pull` is essentially a combination of `git fetch` and `git merge ...` but I have encountered it a number of times where pulling, then comparing shows changes that aren't mine until I also do a fetch:
(on branch blob):
```
git pull origin bl... | This is a common source of confusion, so much so that the `#git` IRC channel has a canned help text for it, called `!pull4`:
> We recommend against using 'git fetch/pull <remote> <refspec>' (i.e. with branch argument), because it doesn't update the <remote>/<branch> ref. The easy way to fetch things properly is to get... |
17367929 | git rebase could not execute editor | 9 | 2013-06-28 15:08:34 | <p>I'm attempting to squash some git commits using rebase. When I run this:</p>
<pre><code>git rebase -i HEAD
</code></pre>
<p>I get this error:</p>
<pre><code>/usr/lib/git-core/git-rebase: 1: eval: /usr/bin/mate: not found
Could not execute editor
</code></pre>
<p>I've attempted to change the git config editor var... | 8,514 | 2,441,134 | 2020-02-17 10:32:44 | 18,798,626 | 17 | 2013-09-14 05:26:58 | 2,778,540 | 2013-09-14 05:26:58 | https://stackoverflow.com/q/17367929 | https://stackoverflow.com/a/18798626 | <p>Do something like that</p>
<pre><code>$ git config --global core.editor emacs
</code></pre>
<p>where <strong>emacs</strong> paste name of your editor</p>
| <p>Do something like that</p> <pre><code>$ git config --global core.editor emacs </code></pre> <p>where <strong>emacs</strong> paste name of your editor</p> | 58, 119, 549, 32868 | git, git-config, linux, ubuntu | <h1>git rebase could not execute editor</h1>
<p>I'm attempting to squash some git commits using rebase. When I run this:</p>
<pre><code>git rebase -i HEAD
</code></pre>
<p>I get this error:</p>
<pre><code>/usr/lib/git-core/git-rebase: 1: eval: /usr/bin/mate: not found
Could not execute editor
</code></pre>
<p>I've ... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 21,396 | git | # git rebase could not execute editor
I'm attempting to squash some git commits using rebase. When I run this:
```
git rebase -i HEAD
```
I get this error:
```
/usr/lib/git-core/git-rebase: 1: eval: /usr/bin/mate: not found
Could not execute editor
```
I've attempted to change the git config editor variable but I ... | Do something like that
```
$ git config --global core.editor emacs
```
where **emacs** paste name of your editor |
18511314 | Git doesn't show untracked directories | 9 | 2013-08-29 12:41:58 | <p>git status command doesn't show new untracked directories and I can't git add them.. How can I resolve this? New and untracked files are shown, the problem is only with new directories.</p>
| 8,040 | 1,817,479 | 2015-09-05 17:46:57 | 18,511,544 | 17 | 2013-08-29 12:51:46 | 1,065,190 | 2013-08-29 12:51:46 | https://stackoverflow.com/q/18511314 | https://stackoverflow.com/a/18511544 | <p><code>Git</code> cannot add directories to the repository. Only files can be added.</p>
<p>If you want to add a directory put an empty <code>.gitignore</code> file into it and add it.</p>
| <p><code>Git</code> cannot add directories to the repository. Only files can be added.</p> <p>If you want to add a directory put an empty <code>.gitignore</code> file into it and add it.</p> | 119 | git | <h1>Git doesn't show untracked directories</h1>
<p>git status command doesn't show new untracked directories and I can't git add them.. How can I resolve this? New and untracked files are shown, the problem is only with new directories.</p>
| q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 21,397 | git | # Git doesn't show untracked directories
git status command doesn't show new untracked directories and I can't git add them.. How can I resolve this? New and untracked files are shown, the problem is only with new directories. | `Git` cannot add directories to the repository. Only files can be added.
If you want to add a directory put an empty `.gitignore` file into it and add it. |
13521782 | Moving a git repository down a hierarchy level | 9 | 2012-11-23 00:33:35 | <p>I was searching for hours now but couldn't find a satisfying answere even though it appears to be simple noobish question. What I basically want to accomplish is to move my .git directory which currently resides besides my project folder down into the project folder. Optimally this shouldn't alter the repository his... | 2,181 | 1,846,302 | 2012-11-23 01:44:19 | 13,521,809 | 17 | 2012-11-23 00:37:39 | 1,864,976 | 2012-11-23 00:37:39 | https://stackoverflow.com/q/13521782 | https://stackoverflow.com/a/13521809 | <p>Sure just move it, then do a</p>
<pre><code>git add -A
git commit -m "moved project"
</code></pre>
<p>in the new root. It won't be a big change in terms of data. It's just going to change the current commit's tree. All objects already exist.</p>
| <p>Sure just move it, then do a</p> <pre><code>git add -A git commit -m "moved project" </code></pre> <p>in the new root. It won't be a big change in terms of data. It's just going to change the current commit's tree. All objects already exist.</p> | 119, 456, 7330, 9684 | git, hierarchy, repository, version-control | <h1>Moving a git repository down a hierarchy level</h1>
<p>I was searching for hours now but couldn't find a satisfying answere even though it appears to be simple noobish question. What I basically want to accomplish is to move my .git directory which currently resides besides my project folder down into the project f... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 21,399 | git | # Moving a git repository down a hierarchy level
I was searching for hours now but couldn't find a satisfying answere even though it appears to be simple noobish question. What I basically want to accomplish is to move my .git directory which currently resides besides my project folder down into the project folder. Op... | Sure just move it, then do a
```
git add -A
git commit -m "moved project"
```
in the new root. It won't be a big change in terms of data. It's just going to change the current commit's tree. All objects already exist. |
5767593 | Recovering Git repository from objects only | 9 | 2011-04-23 23:14:20 | <p>I have a Windows box which has taken it into it's head to delete most of a Git repository (must have tripped the Important Work Detector ;). All I have left (that I can find) is the objects. I'm not sure how complete the collection of objects is, either. Is it possible to recover things from just the objects? As far... | 11,415 | 722,207 | 2011-04-23 23:46:41 | 5,767,710 | 17 | 2011-04-23 23:46:41 | 19,563 | 2011-04-23 23:46:41 | https://stackoverflow.com/q/5767593 | https://stackoverflow.com/a/5767710 | <p>The first thing that I would try is to initialize a new repository with <code>git init</code>. Then I'd copy the objects directory from the dead repository into the new repository. Then I'd run <code>git fsck</code> in the new repository.</p>
<p>With some luck you'll see a whole lot of dangling objects and with a b... | <p>The first thing that I would try is to initialize a new repository with <code>git init</code>. Then I'd copy the objects directory from the dead repository into the new repository. Then I'd run <code>git fsck</code> in the new repository.</p> <p>With some luck you'll see a whole lot of dangling objects and with a b... | 119, 4895, 11782 | data-recovery, disaster-recovery, git | <h1>Recovering Git repository from objects only</h1>
<p>I have a Windows box which has taken it into it's head to delete most of a Git repository (must have tripped the Important Work Detector ;). All I have left (that I can find) is the objects. I'm not sure how complete the collection of objects is, either. Is it pos... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 21,401 | git | # Recovering Git repository from objects only
I have a Windows box which has taken it into it's head to delete most of a Git repository (must have tripped the Important Work Detector ;). All I have left (that I can find) is the objects. I'm not sure how complete the collection of objects is, either. Is it possible to ... | The first thing that I would try is to initialize a new repository with `git init`. Then I'd copy the objects directory from the dead repository into the new repository. Then I'd run `git fsck` in the new repository.
With some luck you'll see a whole lot of dangling objects and with a bit more luck some of the danglin... |
4673168 | I've lost both my master branch and according to GIT, my HEAD (though I could have told it that). How do I get them back? | 9 | 2011-01-12 19:33:27 | <p>I'm not entirely sure of the steps that caused this however I have ended up without my GIT master branch. </p>
<p>I had a crack at fixing things using the instructions here: <a href="http://sitaramc.github.com/concepts/detached-head.html" rel="noreferrer">http://sitaramc.github.com/concepts/detached-head.html</a> h... | 3,833 | 400,790 | 2011-01-12 20:37:28 | 4,673,262 | 17 | 2011-01-12 19:42:21 | 15,464 | 2011-01-12 19:42:21 | https://stackoverflow.com/q/4673168 | https://stackoverflow.com/a/4673262 | <p>The "master" in <code>git checkout master</code> is supposed to be a branch, which you do not have. You can checkout the remote's master and make it your own with <code>git checkout origin/master -b master</code>, which should also set it up as a "tracking branch".</p>
<p>You can see your list of remote branches w... | <p>The "master" in <code>git checkout master</code> is supposed to be a branch, which you do not have. You can checkout the remote's master and make it your own with <code>git checkout origin/master -b master</code>, which should also set it up as a "tracking branch".</p> <p>You can see your list of remote branches w... | 119 | git | <h1>I've lost both my master branch and according to GIT, my HEAD (though I could have told it that). How do I get them back?</h1>
<p>I'm not entirely sure of the steps that caused this however I have ended up without my GIT master branch. </p>
<p>I had a crack at fixing things using the instructions here: <a href="ht... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 21,403 | git | # I've lost both my master branch and according to GIT, my HEAD (though I could have told it that). How do I get them back?
I'm not entirely sure of the steps that caused this however I have ended up without my GIT master branch.
I had a crack at fixing things using the instructions here: <http://sitaramc.github.com/... | The "master" in `git checkout master` is supposed to be a branch, which you do not have. You can checkout the remote's master and make it your own with `git checkout origin/master -b master`, which should also set it up as a "tracking branch".
You can see your list of remote branches with `git branch -r`. |
75210497 | Allowing 'delete branch' without allowing 'rewrite history' in Azure DevOps | 8 | 2023-01-23 13:54:11 | <p>If I try to remove a branch from an Azure DevOps GIT repository, the Force Push permission is required, according to the error message that is shown:</p>
<p><a href="https://i.sstatic.net/qigZy.png" rel="noreferrer"><img src="https://i.sstatic.net/qigZy.png" alt="Failed to delete some-stale-branch-name. Force push p... | 12,688 | 1,677,285 | 2023-02-07 18:20:17 | 75,239,529 | 17 | 2023-01-25 20:30:52 | 184,546 | 2023-02-07 18:20:17 | https://stackoverflow.com/q/75210497 | https://stackoverflow.com/a/75239529 | <blockquote>
<p>I'd like to authorize people to be able to delete branches without giving them the right to mess with history.</p>
</blockquote>
<p>Based on the available permission options, you can't achieve exactly what you're asking, however, it turns out that there's probably a better way anyway. If <em>tl;dr</em> ... | <blockquote> <p>I'd like to authorize people to be able to delete branches without giving them the right to mess with history.</p> </blockquote> <p>Based on the available permission options, you can't achieve exactly what you're asking, however, it turns out that there's probably a better way anyway. If <em>tl;dr</em> ... | 119, 456, 28898, 116537 | azure-devops, git, git-push, version-control | <h1>Allowing 'delete branch' without allowing 'rewrite history' in Azure DevOps</h1>
<p>If I try to remove a branch from an Azure DevOps GIT repository, the Force Push permission is required, according to the error message that is shown:</p>
<p><a href="https://i.sstatic.net/qigZy.png" rel="noreferrer"><img src="https:... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 21,404 | git | # Allowing 'delete branch' without allowing 'rewrite history' in Azure DevOps
If I try to remove a branch from an Azure DevOps GIT repository, the Force Push permission is required, according to the error message that is shown:
[![Failed to delete some-stale-branch-name. Force push permission is required to delete br... | > I'd like to authorize people to be able to delete branches without giving them the right to mess with history.
Based on the available permission options, you can't achieve exactly what you're asking, however, it turns out that there's probably a better way anyway. If *tl;dr* applies then skip to the bottom section: ... |
59293055 | Why do I have problems with loging in to Overleaf via git | 8 | 2019-12-11 19:50:41 | <p>I want to use the connection between git and overleaf (on Windows 10 with git bash). One time it worked, but now I get always errors. </p>
<pre><code>git clone https://git.overleaf.com/number
Cloning into 'number'...
remote: Please sign in using your email address and Overleaf password.
remote:
remote: *Note*: if y... | 6,012 | 10,053,179 | 2022-03-02 00:03:36 | 65,374,991 | 17 | 2020-12-19 22:11:52 | 12,362,982 | 2020-12-19 22:11:52 | https://stackoverflow.com/q/59293055 | https://stackoverflow.com/a/65374991 | <p>To store username and password for Overleaf, add the following to your <code>.gitconfig</code>:</p>
<pre><code>[credential "https://git.overleaf.com"]
username = your@email
helper = store
</code></pre>
| <p>To store username and password for Overleaf, add the following to your <code>.gitconfig</code>:</p> <pre><code>[credential "https://git.overleaf.com"] username = your@email helper = store </code></pre> | 119 | git | <h1>Why do I have problems with loging in to Overleaf via git</h1>
<p>I want to use the connection between git and overleaf (on Windows 10 with git bash). One time it worked, but now I get always errors. </p>
<pre><code>git clone https://git.overleaf.com/number
Cloning into 'number'...
remote: Please sign in using you... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 21,407 | git | # Why do I have problems with loging in to Overleaf via git
I want to use the connection between git and overleaf (on Windows 10 with git bash). One time it worked, but now I get always errors.
```
git clone https://git.overleaf.com/number
Cloning into 'number'...
remote: Please sign in using your email address and O... | To store username and password for Overleaf, add the following to your `.gitconfig`:
```
[credential "https://git.overleaf.com"]
username = your@email
helper = store
``` |
59711967 | How to disable GPG signing per repo | 8 | 2020-01-13 07:09:03 | <p>I currently have GPG signing setup on my computer it works fine. This is required to commit to the repo of the company i work for using my company email address. </p>
<p>How ever I also contribute to a number of open source repos under my own personal git account using my personal email address. </p>
<p>The p... | 5,824 | 1,841,839 | 2020-01-13 07:32:43 | 59,712,153 | 17 | 2020-01-13 07:27:02 | 10,155,936 | 2020-01-13 07:32:43 | https://stackoverflow.com/q/59711967 | https://stackoverflow.com/a/59712153 | <blockquote>
<p>How to disable GPG signing per repo</p>
</blockquote>
<p>For setting the configuration per repository you can run the command below in each local repository you want GPG signing to be disabled ,</p>
<pre><code>git config --local commit.gpgsign false
</code></pre>
<p>or</p>
<pre><code>git config co... | <blockquote> <p>How to disable GPG signing per repo</p> </blockquote> <p>For setting the configuration per repository you can run the command below in each local repository you want GPG signing to be disabled ,</p> <pre><code>git config --local commit.gpgsign false </code></pre> <p>or</p> <pre><code>git config co... | 119, 122019 | git, gpg-signature | <h1>How to disable GPG signing per repo</h1>
<p>I currently have GPG signing setup on my computer it works fine. This is required to commit to the repo of the company i work for using my company email address. </p>
<p>How ever I also contribute to a number of open source repos under my own personal git account usin... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 21,408 | git | # How to disable GPG signing per repo
I currently have GPG signing setup on my computer it works fine. This is required to commit to the repo of the company i work for using my company email address.
How ever I also contribute to a number of open source repos under my own personal git account using my personal email ... | > How to disable GPG signing per repo
For setting the configuration per repository you can run the command below in each local repository you want GPG signing to be disabled ,
```
git config --local commit.gpgsign false
```
or
```
git config commit.gpgsign false
```
From git [docs](https://git-scm.com/docs/git-con... |
57130010 | How to rebase from parent branch? | 8 | 2019-07-21 02:54:53 | <p>Below is the current scenario of branch <code>X</code> & <code>Y</code> in Git:</p>
<pre><code> A - B [origin/master]
\
C - D - G - H [origin/X]
\
E - F [Y]
</code></pre>
<hr>
<p>where,</p>
<p>developer1 is working on branch <code>X</code> </p>
<p>and </p>
<p>am working ... | 19,537 | 3,317,808 | 2019-07-21 03:00:13 | 57,130,023 | 17 | 2019-07-21 02:58:53 | 2,437,508 | 2019-07-21 03:00:13 | https://stackoverflow.com/q/57130010 | https://stackoverflow.com/a/57130023 | <p>It's simple:</p>
<pre><code>git checkout Y
git rebase origin/X
</code></pre>
<p>That is, assuming you will do it <em>after</em> someone (the other developer) rebases X (I see it was rebased on top of master).</p>
<p><strong>Second question</strong>: it creates a local branch Y that has "upstream" branch set to or... | <p>It's simple:</p> <pre><code>git checkout Y git rebase origin/X </code></pre> <p>That is, assuming you will do it <em>after</em> someone (the other developer) rebases X (I see it was rebased on top of master).</p> <p><strong>Second question</strong>: it creates a local branch Y that has "upstream" branch set to or... | 119, 29934, 76220 | git, git-branch, git-rebase | <h1>How to rebase from parent branch?</h1>
<p>Below is the current scenario of branch <code>X</code> & <code>Y</code> in Git:</p>
<pre><code> A - B [origin/master]
\
C - D - G - H [origin/X]
\
E - F [Y]
</code></pre>
<hr>
<p>where,</p>
<p>developer1 is working on branch <code... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 21,409 | git | # How to rebase from parent branch?
Below is the current scenario of branch `X` & `Y` in Git:
```
A - B [origin/master]
\
C - D - G - H [origin/X]
\
E - F [Y]
```
---
where,
developer1 is working on branch `X`
and
am working on branch `Y`.
`X` is parent branch of `Y`.
---
... | It's simple:
```
git checkout Y
git rebase origin/X
```
That is, assuming you will do it *after* someone (the other developer) rebases X (I see it was rebased on top of master).
**Second question**: it creates a local branch Y that has "upstream" branch set to origin/X. Upstream is like the branch that Y will use as... |
24720975 | How can I delete the HEAD branch on a remote Git repository? | 8 | 2014-07-13 08:47:52 | <p>This is a remote Git repository on the server</p>
<pre><code>[aaa@web48 proj.git]$ git ls-remote .
dfca707432eb53678b37026b160a4bdc7f1ac6c3 HEAD
dfca707432eb53678b37026b160a4bdc7f1ac6c3 refs/heads/master
1e09c37443ee758644a712e3c1a8b08b18a1f50d refs/heads/placeholder
</code></pre>
<p>I want to delete the HE... | 28,541 | 315,427 | 2024-11-01 14:38:59 | 24,725,325 | 17 | 2014-07-13 17:25:11 | null | 2024-11-01 14:38:59 | https://stackoverflow.com/q/24720975 | https://stackoverflow.com/a/24725325 | <h3>You cannot delete a remote branch if it's currently the default HEAD branch</h3>
<p>The <code>HEAD</code> symbolic reference on a remote bare repository represents the default branch for that repository. Any non-bare clones of that repository will automatically checkout that branch after the clone.</p>
<p>Because i... | <h3>You cannot delete a remote branch if it's currently the default HEAD branch</h3> <p>The <code>HEAD</code> symbolic reference on a remote bare repository represents the default branch for that repository. Any non-bare clones of that repository will automatically checkout that branch after the clone.</p> <p>Because i... | 119, 78499 | git, git-tower | <h1>How can I delete the HEAD branch on a remote Git repository?</h1>
<p>This is a remote Git repository on the server</p>
<pre><code>[aaa@web48 proj.git]$ git ls-remote .
dfca707432eb53678b37026b160a4bdc7f1ac6c3 HEAD
dfca707432eb53678b37026b160a4bdc7f1ac6c3 refs/heads/master
1e09c37443ee758644a712e3c1a8b08b18a1f... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 21,414 | git | # How can I delete the HEAD branch on a remote Git repository?
This is a remote Git repository on the server
```
[aaa@web48 proj.git]$ git ls-remote .
dfca707432eb53678b37026b160a4bdc7f1ac6c3 HEAD
dfca707432eb53678b37026b160a4bdc7f1ac6c3 refs/heads/master
1e09c37443ee758644a712e3c1a8b08b18a1f50d refs/heads/p... | ### You cannot delete a remote branch if it's currently the default HEAD branch
The `HEAD` symbolic reference on a remote bare repository represents the default branch for that repository. Any non-bare clones of that repository will automatically checkout that branch after the clone.
Because it's the default, you can... |
13955110 | How to find git commits in the repository by commit message? | 8 | 2012-12-19 15:00:38 | <p>We have recently converted our SVN repositories to GIT. It seems that we lost some commits by this conversion and would like to verify this.</p>
<p>So we would like to find a matching git commit for each svn commit to check whether the conversion has actually occured.</p>
<p><code>$ git log|grep "some partial comm... | 5,817 | 887,836 | 2012-12-19 15:35:03 | 13,955,279 | 17 | 2012-12-19 15:09:40 | 828,290 | 2012-12-19 15:18:17 | https://stackoverflow.com/q/13955110 | https://stackoverflow.com/a/13955279 | <p>You can just use the <code>--all</code> option for <code>git log</code></p>
<pre><code>git log --all --oneline --graph --decorate | grep "message"
</code></pre>
<p>Which is equivalent to</p>
<pre><code>git log --all --oneline --graph --decorate --grep "message"
</code></pre>
<p>Or if you would prefer to have the... | <p>You can just use the <code>--all</code> option for <code>git log</code></p> <pre><code>git log --all --oneline --graph --decorate | grep "message" </code></pre> <p>Which is equivalent to</p> <pre><code>git log --all --oneline --graph --decorate --grep "message" </code></pre> <p>Or if you would prefer to have the... | 119 | git | <h1>How to find git commits in the repository by commit message?</h1>
<p>We have recently converted our SVN repositories to GIT. It seems that we lost some commits by this conversion and would like to verify this.</p>
<p>So we would like to find a matching git commit for each svn commit to check whether the conversion... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 21,416 | git | # How to find git commits in the repository by commit message?
We have recently converted our SVN repositories to GIT. It seems that we lost some commits by this conversion and would like to verify this.
So we would like to find a matching git commit for each svn commit to check whether the conversion has actually oc... | You can just use the `--all` option for `git log`
```
git log --all --oneline --graph --decorate | grep "message"
```
Which is equivalent to
```
git log --all --oneline --graph --decorate --grep "message"
```
Or if you would prefer to have the context and don't have a lot of commits you might want to do something l... |
11584220 | What does git log show me? | 8 | 2012-07-20 17:30:46 | <p>I'm missing something. I used to use Mercurial and would look at the revision history of the repo with <code>hg log</code>. Simple: <strong>all</strong> changesets ever made in the repo are shown.</p>
<p>Now I'm using git. I'm pretty excited about learning the new tool, but I'm confused by what I'm seeing with <... | 16,667 | 629,530 | 2012-07-22 02:49:43 | 11,585,536 | 17 | 2012-07-20 19:07:54 | 1,864,976 | 2012-07-20 20:30:04 | https://stackoverflow.com/q/11584220 | https://stackoverflow.com/a/11585536 | <p>There is an implied argument to <code>git log</code> when you don't specify a reference or set of references. It is the current head. So</p>
<pre><code>git log
</code></pre>
<p>expands to</p>
<pre><code>git log HEAD
</code></pre>
<p>which means show me all the commits reachable from the current HEAD (where your ... | <p>There is an implied argument to <code>git log</code> when you don't specify a reference or set of references. It is the current head. So</p> <pre><code>git log </code></pre> <p>expands to</p> <pre><code>git log HEAD </code></pre> <p>which means show me all the commits reachable from the current HEAD (where your ... | 119 | git | <h1>What does git log show me?</h1>
<p>I'm missing something. I used to use Mercurial and would look at the revision history of the repo with <code>hg log</code>. Simple: <strong>all</strong> changesets ever made in the repo are shown.</p>
<p>Now I'm using git. I'm pretty excited about learning the new tool, but I'... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 21,417 | git | # What does git log show me?
I'm missing something. I used to use Mercurial and would look at the revision history of the repo with `hg log`. Simple: **all** changesets ever made in the repo are shown.
Now I'm using git. I'm pretty excited about learning the new tool, but I'm confused by what I'm seeing with `git log... | There is an implied argument to `git log` when you don't specify a reference or set of references. It is the current head. So
```
git log
```
expands to
```
git log HEAD
```
which means show me all the commits reachable from the current HEAD (where your next commit will attach).
In order to see your colleague's wo... |
67600811 | The hook `black` requires pre-commit version 2.9.2 but version 2.6.0 is installed | 7 | 2021-05-19 09:45:05 | <p>I am having trouble with pre-commit and black.</p>
<p>Everything worked fine until I cleared the cache with <code>pre-commit clean</code>. Now I always get the error</p>
<blockquote>
<p>The hook <code>black</code> requires pre-commit version 2.9.2 but version 2.6.0 is installed. Perhaps run `pip install --upgrade pr... | 9,236 | 15,275,205 | 2023-02-10 13:55:00 | 67,606,494 | 17 | 2021-05-19 15:42:44 | 812,183 | 2021-05-19 15:50:51 | https://stackoverflow.com/q/67600811 | https://stackoverflow.com/a/67606494 | <p><code>rev: stable</code> is not a supported configuration -- when you run you'll also get a warning telling you exactly that:</p>
<pre><code>$ pre-commit run black --all-files
[WARNING] The 'rev' field of repo 'https://github.com/ambv/black' appears to be a mutable reference
(moving tag / branch). Mutable referenc... | <p><code>rev: stable</code> is not a supported configuration -- when you run you'll also get a warning telling you exactly that:</p> <pre><code>$ pre-commit run black --all-files [WARNING] The 'rev' field of repo 'https://github.com/ambv/black' appears to be a mutable reference (moving tag / branch). Mutable referenc... | 16, 119, 14000, 25281, 139402 | git, pre-commit, pre-commit.com, pre-commit-hook, python | <h1>The hook `black` requires pre-commit version 2.9.2 but version 2.6.0 is installed</h1>
<p>I am having trouble with pre-commit and black.</p>
<p>Everything worked fine until I cleared the cache with <code>pre-commit clean</code>. Now I always get the error</p>
<blockquote>
<p>The hook <code>black</code> requires pre... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 21,420 | git | # The hook `black` requires pre-commit version 2.9.2 but version 2.6.0 is installed
I am having trouble with pre-commit and black.
Everything worked fine until I cleared the cache with `pre-commit clean`. Now I always get the error
> The hook `black` requires pre-commit version 2.9.2 but version 2.6.0 is installed. ... | `rev: stable` is not a supported configuration -- when you run you'll also get a warning telling you exactly that:
```
$ pre-commit run black --all-files
[WARNING] The 'rev' field of repo 'https://github.com/ambv/black' appears to be a mutable reference
(moving tag / branch). Mutable references are never updated aft... |
67155960 | How to change global git settings to do git merge during pull | 7 | 2021-04-19 04:26:51 | <p>Currently, my global settings are set to do a rebase during a git pull. I want it to change it to git merge by default. How do I change this setting?</p>
| 5,527 | 6,038,524 | 2021-04-19 04:42:31 | 67,156,022 | 17 | 2021-04-19 04:36:51 | 10,871,900 | 2021-04-19 04:42:31 | https://stackoverflow.com/q/67155960 | https://stackoverflow.com/a/67156022 | <h2>TL;DR</h2>
<pre><code>git config --global pull.rebase false
</code></pre>
<h2>A bit detail</h2>
<p>Git uses the configuration <code>pull.rebase</code> for this.</p>
<p>If you want to disable rebasing on pull, it can be set to false:</p>
<pre><code>git config pull.rebase false
</code></pre>
<p>In order to do this gl... | <h2>TL;DR</h2> <pre><code>git config --global pull.rebase false </code></pre> <h2>A bit detail</h2> <p>Git uses the configuration <code>pull.rebase</code> for this.</p> <p>If you want to disable rebasing on pull, it can be set to false:</p> <pre><code>git config pull.rebase false </code></pre> <p>In order to do this gl... | 119 | git | <h1>How to change global git settings to do git merge during pull</h1>
<p>Currently, my global settings are set to do a rebase during a git pull. I want it to change it to git merge by default. How do I change this setting?</p>
| q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 21,421 | git | # How to change global git settings to do git merge during pull
Currently, my global settings are set to do a rebase during a git pull. I want it to change it to git merge by default. How do I change this setting? | ## TL;DR
```
git config --global pull.rebase false
```
## A bit detail
Git uses the configuration `pull.rebase` for this.
If you want to disable rebasing on pull, it can be set to false:
```
git config pull.rebase false
```
In order to do this globally, use
```
git config --global pull.rebase false
```
With thi... |
50968652 | Git Filter-Branch All command | 7 | 2018-06-21 12:31:39 | <p>At the moment, I'm currently using the command, "git filter-branch --subdirectory-filter MY_DIRECTORY -- --all" to grab a certain directory from all the 30 branches in this git repo. Before I do this filter branch command I make sure to checkout every branch to make sure the --all commands works properly. </p>
<p>M... | 11,020 | 6,520,148 | 2018-06-21 17:14:26 | 50,974,193 | 17 | 2018-06-21 17:14:26 | 1,256,452 | 2018-06-21 17:14:26 | https://stackoverflow.com/q/50968652 | https://stackoverflow.com/a/50974193 | <h3>Before we start</h3>
<p>Before I dive into the answer itself, note that if you want to have a local branch name for each of your remote-tracking names, you can simply create that local branch name without using <code>git checkout</code>:</p>
<pre><code>git branch -t develop origin/develop
git branch -t feature/X ... | <h3>Before we start</h3> <p>Before I dive into the answer itself, note that if you want to have a local branch name for each of your remote-tracking names, you can simply create that local branch name without using <code>git checkout</code>:</p> <pre><code>git branch -t develop origin/develop git branch -t feature/X ... | 119, 46509 | git, git-filter-branch | <h1>Git Filter-Branch All command</h1>
<p>At the moment, I'm currently using the command, "git filter-branch --subdirectory-filter MY_DIRECTORY -- --all" to grab a certain directory from all the 30 branches in this git repo. Before I do this filter branch command I make sure to checkout every branch to make sure the --... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 21,422 | git | # Git Filter-Branch All command
At the moment, I'm currently using the command, "git filter-branch --subdirectory-filter MY_DIRECTORY -- --all" to grab a certain directory from all the 30 branches in this git repo. Before I do this filter branch command I make sure to checkout every branch to make sure the --all comma... | ### Before we start
Before I dive into the answer itself, note that if you want to have a local branch name for each of your remote-tracking names, you can simply create that local branch name without using `git checkout`:
```
git branch -t develop origin/develop
git branch -t feature/X origin/feature/X
git branch -t... |
49636441 | Git pull from specific branch | 7 | 2018-04-03 18:00:01 | <p>I want to pull changes from specified branch to my local repository, but I don't wont it to merge with master branch. What is the right way to do that? Do I have to make my own branch and than pull? </p>
| 26,064 | 3,568,043 | 2020-06-13 10:31:07 | 49,636,526 | 17 | 2018-04-03 18:04:33 | 1,875,092 | 2020-06-13 10:31:07 | https://stackoverflow.com/q/49636441 | https://stackoverflow.com/a/49636526 | <p><code>git pull</code> is the same as <code>git fetch</code> followed by <code>git merge</code>.</p>
<p>To create a local branch tracking a branch on a remote, first fetch from the remote and then run <code>git checkout</code> with the name of a branch that matches that on the remote:</p>
<pre><code>git fetch <r... | <p><code>git pull</code> is the same as <code>git fetch</code> followed by <code>git merge</code>.</p> <p>To create a local branch tracking a branch on a remote, first fetch from the remote and then run <code>git checkout</code> with the name of a branch that matches that on the remote:</p> <pre><code>git fetch <r... | 119, 4860 | git, pull | <h1>Git pull from specific branch</h1>
<p>I want to pull changes from specified branch to my local repository, but I don't wont it to merge with master branch. What is the right way to do that? Do I have to make my own branch and than pull? </p>
| q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 21,423 | git | # Git pull from specific branch
I want to pull changes from specified branch to my local repository, but I don't wont it to merge with master branch. What is the right way to do that? Do I have to make my own branch and than pull? | `git pull` is the same as `git fetch` followed by `git merge`.
To create a local branch tracking a branch on a remote, first fetch from the remote and then run `git checkout` with the name of a branch that matches that on the remote:
```
git fetch <remote>
git checkout <branch>
```
- `<remote>` is the name of the re... |
47572505 | How to force Visual Studio to refresh list of remote git branches in Team Explorer-Branches? | 7 | 2017-11-30 11:34:44 | <p>Visual Studio 2015 and 2017 doesn't update remote branches in Team Explroer - Branches section. This means that whenever somebody adds a branch on remote or remove I can't see it through Team Explorer. Instead I am forced to use Source Tree and then magically Visual Studio notices the new branches. I click refresh b... | 11,487 | 1,123,020 | 2021-03-03 14:44:49 | 47,573,094 | 17 | 2017-11-30 12:04:44 | 2,618,670 | 2017-11-30 12:04:44 | https://stackoverflow.com/q/47572505 | https://stackoverflow.com/a/47573094 | <p>You need to trigger a <code>git fetch</code> from Visual Studio (which Sourcetree has been doing up until now)</p>
<p>In Visual Studio 2017 Team Explorer go to the "Branches" section, right click the Master branch and select "fetch". You should now be able to see the new remote branches.</p>
| <p>You need to trigger a <code>git fetch</code> from Visual Studio (which Sourcetree has been doing up until now)</p> <p>In Visual Studio 2017 Team Explorer go to the "Branches" section, right click the Master branch and select "fetch". You should now be able to see the new remote branches.</p> | 119, 33953, 37315 | git, team-explorer, visual-studio | <h1>How to force Visual Studio to refresh list of remote git branches in Team Explorer-Branches?</h1>
<p>Visual Studio 2015 and 2017 doesn't update remote branches in Team Explroer - Branches section. This means that whenever somebody adds a branch on remote or remove I can't see it through Team Explorer. Instead I am ... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 21,424 | git | # How to force Visual Studio to refresh list of remote git branches in Team Explorer-Branches?
Visual Studio 2015 and 2017 doesn't update remote branches in Team Explroer - Branches section. This means that whenever somebody adds a branch on remote or remove I can't see it through Team Explorer. Instead I am forced to... | You need to trigger a `git fetch` from Visual Studio (which Sourcetree has been doing up until now)
In Visual Studio 2017 Team Explorer go to the "Branches" section, right click the Master branch and select "fetch". You should now be able to see the new remote branches. |
45418789 | How to give up unstaged changes | 7 | 2017-07-31 14:35:31 | <p>I made some changes on my local machine and I don't want to keep them.</p>
<p>When I perform a <strong>pull</strong> to get the recent changes from the server I get a message saying that I have unstaged changes and I must commit or stash them.</p>
<p>But I don't want to do it. I want to cancel them. How to do this... | 27,000 | 3,654,571 | 2021-10-14 18:12:06 | 45,418,804 | 17 | 2017-07-31 14:36:40 | 7,200,715 | 2017-07-31 14:38:43 | https://stackoverflow.com/q/45418789 | https://stackoverflow.com/a/45418804 | <p><code>git checkout .</code> to undo all non-commited changes on tracked files.</p>
<p><code>git clean -f</code> to remove non-commited files.</p>
<p>PS: <code>.</code> in <code>git checkout .</code> is shell wildcard that means "<em>all files within current directories and subdirectories</em>". You can use any wil... | <p><code>git checkout .</code> to undo all non-commited changes on tracked files.</p> <p><code>git clean -f</code> to remove non-commited files.</p> <p>PS: <code>.</code> in <code>git checkout .</code> is shell wildcard that means "<em>all files within current directories and subdirectories</em>". You can use any wil... | 119 | git | <h1>How to give up unstaged changes</h1>
<p>I made some changes on my local machine and I don't want to keep them.</p>
<p>When I perform a <strong>pull</strong> to get the recent changes from the server I get a message saying that I have unstaged changes and I must commit or stash them.</p>
<p>But I don't want to do ... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 21,425 | git | # How to give up unstaged changes
I made some changes on my local machine and I don't want to keep them.
When I perform a **pull** to get the recent changes from the server I get a message saying that I have unstaged changes and I must commit or stash them.
But I don't want to do it. I want to cancel them. How to do... | `git checkout .` to undo all non-commited changes on tracked files.
`git clean -f` to remove non-commited files.
PS: `.` in `git checkout .` is shell wildcard that means "*all files within current directories and subdirectories*". You can use any wildcard or path (`git checkout path/` or `git checkout ./*.py`) |
43543035 | Change GIT login/username in IntelliJ IDEA, WebStorm, RubyMine etc | 7 | 2017-04-21 12:43:02 | <p>Authentication login/username for my GIT account changed.
How do I tell this to my IntelliJ product?</p>
| 30,420 | 1,218,956 | 2021-11-11 10:29:42 | 43,543,036 | 17 | 2017-04-21 12:43:02 | 1,218,956 | 2021-11-11 10:29:42 | https://stackoverflow.com/q/43543035 | https://stackoverflow.com/a/43543036 | <p>GIT record login-name in remote repository URL. You can change that in IntelliJ product in couple of ways.</p>
<h2>Quick way 2021</h2>
<ul>
<li>Double-click <kbd>SHIFT</kbd> (i.e. <kbd>SHIFT</kbd> <kbd>SHIFT</kbd>)</li>
<li>Search-everywhere opens up</li>
<li>Start typing <em>Manage Remotes...</em></li>
<li>Proceed ... | <p>GIT record login-name in remote repository URL. You can change that in IntelliJ product in couple of ways.</p> <h2>Quick way 2021</h2> <ul> <li>Double-click <kbd>SHIFT</kbd> (i.e. <kbd>SHIFT</kbd> <kbd>SHIFT</kbd>)</li> <li>Search-everywhere opens up</li> <li>Start typing <em>Manage Remotes...</em></li> <li>Proceed ... | 119, 8945, 15175, 66822 | git, intellij-idea, rubymine, webstorm | <h1>Change GIT login/username in IntelliJ IDEA, WebStorm, RubyMine etc</h1>
<p>Authentication login/username for my GIT account changed.
How do I tell this to my IntelliJ product?</p>
| q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 21,426 | git | # Change GIT login/username in IntelliJ IDEA, WebStorm, RubyMine etc
Authentication login/username for my GIT account changed.
How do I tell this to my IntelliJ product? | GIT record login-name in remote repository URL. You can change that in IntelliJ product in couple of ways.
## Quick way 2021
- Double-click `SHIFT` (i.e. `SHIFT` `SHIFT`)
- Search-everywhere opens up
- Start typing *Manage Remotes...*
- Proceed as described below in *quick way*
## Quick way
- Type `CTRL` + `SHIFT` ... |
32454065 | Windows - cp file in Git Bash | 7 | 2015-09-08 09:27:58 | <p>I want to copy <code>/c/xampp/docs/fproject/.git</code> to <code>/c/xampp/docs/finalproject</code>. </p>
<p>I tried this command
<code>cp /c/xampp/docs/fproject/.git finalproject</code>,
and this message <code>cp:omitting directory 'c/xampp/docs/fproject/.git'</code> is shown but the file wasn't copied. </p>
<p>... | 31,894 | 4,943,748 | 2020-12-22 19:18:28 | 32,454,181 | 17 | 2015-09-08 09:33:14 | 1,157,272 | 2015-09-08 09:33:14 | https://stackoverflow.com/q/32454065 | https://stackoverflow.com/a/32454181 | <p><code>.git</code> is a directory, use <code>cp -r /c/xampp/docs/fproject/.git /c/xampp/docs/finalproject</code></p>
| <p><code>.git</code> is a directory, use <code>cp -r /c/xampp/docs/fproject/.git /c/xampp/docs/finalproject</code></p> | 64, 119 | git, windows | <h1>Windows - cp file in Git Bash</h1>
<p>I want to copy <code>/c/xampp/docs/fproject/.git</code> to <code>/c/xampp/docs/finalproject</code>. </p>
<p>I tried this command
<code>cp /c/xampp/docs/fproject/.git finalproject</code>,
and this message <code>cp:omitting directory 'c/xampp/docs/fproject/.git'</code> is show... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 21,427 | git | # Windows - cp file in Git Bash
I want to copy `/c/xampp/docs/fproject/.git` to `/c/xampp/docs/finalproject`.
I tried this command
`cp /c/xampp/docs/fproject/.git finalproject`,
and this message `cp:omitting directory 'c/xampp/docs/fproject/.git'` is shown but the file wasn't copied.
How can I copy `.git` file? | `.git` is a directory, use `cp -r /c/xampp/docs/fproject/.git /c/xampp/docs/finalproject` |
31813965 | Custom SSH Config Not Working | 7 | 2015-08-04 15:57:13 | <p>I have been trying to get ssh to connect to Github using port 443 and I have decided to use a custom ssh config file at <code>~/.ssh/config</code>. After creating the file and setting the proper file permissions I attempt to connect again, the connection is still timing out on port 22. I know this because port 22 is... | 23,137 | 856,150 | 2023-09-23 10:25:30 | 31,814,103 | 17 | 2015-08-04 16:04:17 | 4,850,040 | 2023-09-23 10:25:30 | https://stackoverflow.com/q/31813965 | https://stackoverflow.com/a/31814103 | <p>You wrote:</p>
<pre><code> Host github.com
HostName ssh.github.com
Port 443
</code></pre>
<p>But didn't use it:</p>
<pre><code> ssh -T git@ssh.github.com
</code></pre>
<p>You need to</p>
<pre><code> ssh -T git@github.com
</code></pre>
<p>to use the <code>github.com</code> host you defined.</p>
<hr />
<p>Altern... | <p>You wrote:</p> <pre><code> Host github.com HostName ssh.github.com Port 443 </code></pre> <p>But didn't use it:</p> <pre><code> ssh -T git@ssh.github.com </code></pre> <p>You need to</p> <pre><code> ssh -T git@github.com </code></pre> <p>to use the <code>github.com</code> host you defined.</p> <hr /> <p>Altern... | 119, 386, 700 | git, port, ssh | <h1>Custom SSH Config Not Working</h1>
<p>I have been trying to get ssh to connect to Github using port 443 and I have decided to use a custom ssh config file at <code>~/.ssh/config</code>. After creating the file and setting the proper file permissions I attempt to connect again, the connection is still timing out on ... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 21,428 | git | # Custom SSH Config Not Working
I have been trying to get ssh to connect to Github using port 443 and I have decided to use a custom ssh config file at `~/.ssh/config`. After creating the file and setting the proper file permissions I attempt to connect again, the connection is still timing out on port 22. I know this... | You wrote:
```
Host github.com
HostName ssh.github.com
Port 443
```
But didn't use it:
```
ssh -T git@ssh.github.com
```
You need to
```
ssh -T git@github.com
```
to use the `github.com` host you defined.
---
Alternatively, add `ssh.github.com` as another name to match:
```
Host github.com ssh.github... |
27646133 | WARNING: Your version of git is 1.9.3. has serious security vulnerabilities | 7 | 2014-12-25 09:55:33 | <p>I received a warning regarding serious security vulnerability of git 1.9.3 during deploy to Heroku</p>
<p>I tried to update git via homebrew but found that git was not originally installed via homebrew</p>
<p>Then I installed it via homebrew</p>
<pre><code>brew update
brew install git
==> Downloading https://... | 4,076 | 781,048 | 2015-01-07 05:25:32 | 27,646,134 | 17 | 2014-12-25 09:55:33 | 781,048 | 2014-12-25 10:02:10 | https://stackoverflow.com/q/27646133 | https://stackoverflow.com/a/27646134 | <pre><code>⇒ which git
/usr/bin/git
⇒ git --version
git version 1.9.3 (Apple Git-50)
</code></pre>
<p>You need to rename original <strong>git</strong> at <strong>/usr/bin/git</strong>, e.g.</p>
<pre><code>sudo mv /usr/bin/git /usr/bin/git-original
</code></pre>
<p>Now check location and version again</p>
<pre><c... | <pre><code>⇒ which git /usr/bin/git ⇒ git --version git version 1.9.3 (Apple Git-50) </code></pre> <p>You need to rename original <strong>git</strong> at <strong>/usr/bin/git</strong>, e.g.</p> <pre><code>sudo mv /usr/bin/git /usr/bin/git-original </code></pre> <p>Now check location and version again</p> <pre><c... | 119, 136, 369, 1067, 8279 | git, heroku, homebrew, macos, security | <h1>WARNING: Your version of git is 1.9.3. has serious security vulnerabilities</h1>
<p>I received a warning regarding serious security vulnerability of git 1.9.3 during deploy to Heroku</p>
<p>I tried to update git via homebrew but found that git was not originally installed via homebrew</p>
<p>Then I installed it v... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 21,431 | git | # WARNING: Your version of git is 1.9.3. has serious security vulnerabilities
I received a warning regarding serious security vulnerability of git 1.9.3 during deploy to Heroku
I tried to update git via homebrew but found that git was not originally installed via homebrew
Then I installed it via homebrew
```
brew u... | ```
⇒ which git
/usr/bin/git
⇒ git --version
git version 1.9.3 (Apple Git-50)
```
You need to rename original **git** at **/usr/bin/git**, e.g.
```
sudo mv /usr/bin/git /usr/bin/git-original
```
Now check location and version again
```
⇒ which git
/usr/local/bin/git
⇒ git --version
git version 2.2.1
```
Add ... |
20688914 | `bundle install` fails (because of git protocol) | 7 | 2013-12-19 18:20:42 | <p>With this simple Gemfile, </p>
<pre><code>source 'https://rubygems.org'
gem 'activerecord', "~> 2.2.3"
gem 'activerecord-sqlserver-adapter', github: 'arthrex/activerecord-sqlserver-adapter', :branch => '2-3-stable'
</code></pre>
<p><code>bundle install</code> fails with </p>
<pre><code>Fetching git://github... | 4,766 | 241,142 | 2014-07-24 21:27:15 | 20,688,967 | 17 | 2013-12-19 18:23:35 | 96,740 | 2013-12-19 18:38:15 | https://stackoverflow.com/q/20688914 | https://stackoverflow.com/a/20688967 | <p>Don't use the <code>github:</code> short form in your Gemfile, just use the regular <code>git:</code> syntax</p>
<pre><code>gem 'activerecord-sqlserver-adapter', git: 'http://github.com/arthrex/activerecord-sqlserver-adapter.git'
</code></pre>
| <p>Don't use the <code>github:</code> short form in your Gemfile, just use the regular <code>git:</code> syntax</p> <pre><code>gem 'activerecord-sqlserver-adapter', git: 'http://github.com/arthrex/activerecord-sqlserver-adapter.git' </code></pre> | 12, 119, 43112, 105978 | bundler, dtn, git, ruby | <h1>`bundle install` fails (because of git protocol)</h1>
<p>With this simple Gemfile, </p>
<pre><code>source 'https://rubygems.org'
gem 'activerecord', "~> 2.2.3"
gem 'activerecord-sqlserver-adapter', github: 'arthrex/activerecord-sqlserver-adapter', :branch => '2-3-stable'
</code></pre>
<p><code>bundle instal... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 21,432 | git | # `bundle install` fails (because of git protocol)
With this simple Gemfile,
```
source 'https://rubygems.org'
gem 'activerecord', "~> 2.2.3"
gem 'activerecord-sqlserver-adapter', github: 'arthrex/activerecord-sqlserver-adapter', :branch => '2-3-stable'
```
`bundle install` fails with
```
Fetching git://github.com/... | Don't use the `github:` short form in your Gemfile, just use the regular `git:` syntax
```
gem 'activerecord-sqlserver-adapter', git: 'http://github.com/arthrex/activerecord-sqlserver-adapter.git'
``` |
19314287 | Can I influence the merge strategy used by "recursive" when applying a git stash? | 7 | 2013-10-11 09:04:58 | <p>I have a set of debug utilities living in a git stash slot; I'm moving between branches which differ only very slightly regarding the changes in the stash. I <code>git stash apply</code> the top stash on the respective branch to test a feature.</p>
<p>However I ran into a proper merge conflict in one of the branche... | 2,271 | 430,766 | 2015-07-31 03:07:18 | 19,328,859 | 17 | 2013-10-11 23:43:52 | 1,290,731 | 2015-07-31 03:07:18 | https://stackoverflow.com/q/19314287 | https://stackoverflow.com/a/19328859 | <p>Yes, you can just do the merge yourself. The stash commit's named <code>stash</code>. </p>
<pre><code>git cherry-pick -n -m1 -Xtheirs stash
</code></pre>
<p>Cherrypick does a merge with the cherrypick's parent as the base. <a href="http://git-scm.com/docs/git-stash#_discussion" rel="noreferrer">Stash commits reco... | <p>Yes, you can just do the merge yourself. The stash commit's named <code>stash</code>. </p> <pre><code>git cherry-pick -n -m1 -Xtheirs stash </code></pre> <p>Cherrypick does a merge with the cherrypick's parent as the base. <a href="http://git-scm.com/docs/git-stash#_discussion" rel="noreferrer">Stash commits reco... | 119, 717, 1879, 13091 | branch, git, git-stash, merge | <h1>Can I influence the merge strategy used by "recursive" when applying a git stash?</h1>
<p>I have a set of debug utilities living in a git stash slot; I'm moving between branches which differ only very slightly regarding the changes in the stash. I <code>git stash apply</code> the top stash on the respective branch ... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 21,433 | git | # Can I influence the merge strategy used by "recursive" when applying a git stash?
I have a set of debug utilities living in a git stash slot; I'm moving between branches which differ only very slightly regarding the changes in the stash. I `git stash apply` the top stash on the respective branch to test a feature.
... | Yes, you can just do the merge yourself. The stash commit's named `stash`.
```
git cherry-pick -n -m1 -Xtheirs stash
```
Cherrypick does a merge with the cherrypick's parent as the base. [Stash commits record the worktree state with two parents, the checked-out commit and the stashed index](http://git-scm.com/docs/gi... |
16955644 | Git - how to include only certain files and dirs from the whole working tree? | 7 | 2013-06-06 06:59:14 | <p>I am developing an extension for magento. There is a lot of files in working dir, but I need to include in git only those I added in extension. How can I define in .gitignore rules for this case?</p>
<p>I tried this - <strong>.gitignore</strong>:</p>
<pre><code>*
!/app/etc/modules/Some_Ext.xml
!/app/code/local/Som... | 6,349 | 535,142 | 2013-10-11 02:36:53 | 16,963,122 | 17 | 2013-06-06 13:15:18 | 1,249,851 | 2013-10-11 02:36:53 | https://stackoverflow.com/q/16955644 | https://stackoverflow.com/a/16963122 | <p><strong>UPDATE</strong>:</p>
<p>There is an easier solution:</p>
<pre><code>*
!*/
!/app/etc/modules/Some_Ext.xml
!/app/code/local/Some/Ext/
!/app/designer/...
... - etc.
</code></pre>
<p>The second line will include all directories again then following patterns can take effect.</p>
<hr>
<p>Well, have explored t... | <p><strong>UPDATE</strong>:</p> <p>There is an easier solution:</p> <pre><code>* !*/ !/app/etc/modules/Some_Ext.xml !/app/code/local/Some/Ext/ !/app/designer/... ... - etc. </code></pre> <p>The second line will include all directories again then following patterns can take effect.</p> <hr> <p>Well, have explored t... | 119 | git | <h1>Git - how to include only certain files and dirs from the whole working tree?</h1>
<p>I am developing an extension for magento. There is a lot of files in working dir, but I need to include in git only those I added in extension. How can I define in .gitignore rules for this case?</p>
<p>I tried this - <strong>.gi... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 21,434 | git | # Git - how to include only certain files and dirs from the whole working tree?
I am developing an extension for magento. There is a lot of files in working dir, but I need to include in git only those I added in extension. How can I define in .gitignore rules for this case?
I tried this - **.gitignore**:
```
*
!/ap... | **UPDATE**:
There is an easier solution:
```
*
!*/
!/app/etc/modules/Some_Ext.xml
!/app/code/local/Some/Ext/
!/app/designer/...
... - etc.
```
The second line will include all directories again then following patterns can take effect.
---
Well, have explored the source code, I found the 'gitignore' mechanism is in... |
4556315 | git commit You have some suspicious patch lines | 7 | 2010-12-29 17:35:25 | <p><code>git commit</code> giving me the following message</p>
<pre><code>*
* You have some suspicious patch lines:
*
* In projects/bong/traid/apps/controller/project.php
* trailing whitespace (line 220)
projects/bong/traid/apps/controller/project.php:220:
* trailing whitespace (line 223)
</code></pre>
<p>Wha... | 3,984 | 256,007 | 2016-10-11 17:45:58 | 7,928,891 | 17 | 2011-10-28 11:56:36 | 611,467 | 2016-10-11 17:45:58 | https://stackoverflow.com/q/4556315 | https://stackoverflow.com/a/7928891 | <p>That happens when the file has trailing whitespace, if you run:</p>
<pre><code>git commit --no-verify
</code></pre>
<p>it will commit ok.
<a href="http://danklassen.com/wordpress/2008/12/git-you-have-some-suspicious-patch-lines/" rel="nofollow noreferrer">ref</a></p>
| <p>That happens when the file has trailing whitespace, if you run:</p> <pre><code>git commit --no-verify </code></pre> <p>it will commit ok. <a href="http://danklassen.com/wordpress/2008/12/git-you-have-some-suspicious-patch-lines/" rel="nofollow noreferrer">ref</a></p> | 119 | git | <h1>git commit You have some suspicious patch lines</h1>
<p><code>git commit</code> giving me the following message</p>
<pre><code>*
* You have some suspicious patch lines:
*
* In projects/bong/traid/apps/controller/project.php
* trailing whitespace (line 220)
projects/bong/traid/apps/controller/project.php:220: ... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 21,435 | git | # git commit You have some suspicious patch lines
`git commit` giving me the following message
```
*
* You have some suspicious patch lines:
*
* In projects/bong/traid/apps/controller/project.php
* trailing whitespace (line 220)
projects/bong/traid/apps/controller/project.php:220:
* trailing whitespace (line ... | That happens when the file has trailing whitespace, if you run:
```
git commit --no-verify
```
it will commit ok.
[ref](http://danklassen.com/wordpress/2008/12/git-you-have-some-suspicious-patch-lines/) |
7571047 | Git - compare local and remote without fetching first? | 7 | 2011-09-27 14:43:00 | <p>I've searched around and found no answer to this question.</p>
<p>I have an app running on Heroku.
From my local machine I typically implement and just:</p>
<pre><code>git add .
git commit -m "whatever change, I know I can add and commit at the same time..."
git push <the-heroku-repo>
</code></pre>
<p>Then... | 11,752 | 788,754 | 2011-09-27 15:04:03 | 7,571,219 | 17 | 2011-09-27 14:55:40 | 223,092 | 2011-09-27 15:04:03 | https://stackoverflow.com/q/7571047 | https://stackoverflow.com/a/7571219 | <p>Although you can get some summary information about the branches in the <code>origin</code> repository using:</p>
<pre><code>git remote show origin
</code></pre>
<p>... you do need to fetch the branches from <code>origin</code> into your repository somehow in order to compare them. This is what <code>git fetch</c... | <p>Although you can get some summary information about the branches in the <code>origin</code> repository using:</p> <pre><code>git remote show origin </code></pre> <p>... you do need to fetch the branches from <code>origin</code> into your repository somehow in order to compare them. This is what <code>git fetch</c... | 119, 2936 | compare, git | <h1>Git - compare local and remote without fetching first?</h1>
<p>I've searched around and found no answer to this question.</p>
<p>I have an app running on Heroku.
From my local machine I typically implement and just:</p>
<pre><code>git add .
git commit -m "whatever change, I know I can add and commit at the same ... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 21,436 | git | # Git - compare local and remote without fetching first?
I've searched around and found no answer to this question.
I have an app running on Heroku.
From my local machine I typically implement and just:
```
git add .
git commit -m "whatever change, I know I can add and commit at the same time..."
git push <the-herok... | Although you can get some summary information about the branches in the `origin` repository using:
```
git remote show origin
```
... you do need to fetch the branches from `origin` into your repository somehow in order to compare them. This is what `git fetch` does. When you run `git fetch origin`, it will by defaul... |
6798508 | How to get Latitude and Longitude information from picture | 7 | 2011-07-23 05:49:35 | <p>How to get latitude and longitude information from picture store in device or SD Card?</p>
| 15,689 | 544,512 | 2018-10-23 18:19:53 | 6,814,979 | 17 | 2011-07-25 10:53:14 | 544,512 | 2018-10-23 18:19:53 | https://stackoverflow.com/q/6798508 | https://stackoverflow.com/a/6814979 | <p>I found very simple solution for this question....So I posted it here to help my friends who have problem like me to get Geo location from Picture.</p>
<pre><code>Bundle bundle = getIntent().getExtras();
if(null != bundle)
{
String filepath = bundle.getString(FILE_PATH_KEY);
try
{
ExifInterfa... | <p>I found very simple solution for this question....So I posted it here to help my friends who have problem like me to get Geo location from Picture.</p> <pre><code>Bundle bundle = getIntent().getExtras(); if(null != bundle) { String filepath = bundle.getString(FILE_PATH_KEY); try { ExifInterfa... | 17, 1386, 4985, 10580, 20301 | android, geolocation, image, java, latitude-longitude | <h1>How to get Latitude and Longitude information from picture</h1>
<p>How to get latitude and longitude information from picture store in device or SD Card?</p>
| q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 21,437 | git | # How to get Latitude and Longitude information from picture
How to get latitude and longitude information from picture store in device or SD Card? | I found very simple solution for this question....So I posted it here to help my friends who have problem like me to get Geo location from Picture.
```
Bundle bundle = getIntent().getExtras();
if(null != bundle)
{
String filepath = bundle.getString(FILE_PATH_KEY);
try
{
ExifInterface exif = new ... |
60455045 | how to fix the would clobber existing tag problem | 6 | 2020-02-28 15:45:13 | <p>I've got myself into trouble with git tagging and now my build pipeline (semaphore) is broken with the following error message. Not sure how to get this resolved. </p>
<p><strong>Error message</strong></p>
<pre><code>Unpacking
objects: 100% (32/32), done.
From github.com:jack/my-app
c8a2420..75ea515 develop... | 11,079 | 12,492,684 | 2021-11-18 10:23:52 | 60,455,641 | 17 | 2020-02-28 16:20:50 | 86,072 | 2021-11-18 10:23:52 | https://stackoverflow.com/q/60455045 | https://stackoverflow.com/a/60455641 | <p>The cause is : tag <code>v1.46.0</code> on your remote does not point at the same commit as tag <code>v1.46.0</code> on the local clone (local to your CI server).</p>
<hr />
<p>a. Check that the <code>v1.46.0</code> tag points at the right commit on the remote server (update it manually if needed),</p>
<p>b. Force u... | <p>The cause is : tag <code>v1.46.0</code> on your remote does not point at the same commit as tag <code>v1.46.0</code> on the local clone (local to your CI server).</p> <hr /> <p>a. Check that the <code>v1.46.0</code> tag points at the right commit on the remote server (update it manually if needed),</p> <p>b. Force u... | 119, 119203 | git, semaphore-ci | <h1>how to fix the would clobber existing tag problem</h1>
<p>I've got myself into trouble with git tagging and now my build pipeline (semaphore) is broken with the following error message. Not sure how to get this resolved. </p>
<p><strong>Error message</strong></p>
<pre><code>Unpacking
objects: 100% (32/32), don... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 21,439 | git | # how to fix the would clobber existing tag problem
I've got myself into trouble with git tagging and now my build pipeline (semaphore) is broken with the following error message. Not sure how to get this resolved.
**Error message**
```
Unpacking
objects: 100% (32/32), done.
From github.com:jack/my-app
c8a2420..... | The cause is : tag `v1.46.0` on your remote does not point at the same commit as tag `v1.46.0` on the local clone (local to your CI server).
---
a. Check that the `v1.46.0` tag points at the right commit on the remote server (update it manually if needed),
b. Force update the tag(s) on the CI server by running one o... |
23268042 | how to see changed lines of code between 2 branches for specific file type? | 6 | 2014-04-24 11:49:01 | <p>I want to create a metric that shows me "changed lines of code" per "Bug" between two Versions (in my case branches in git).</p>
<p>Because our application has a lot of .swf files, I don't need to count those swf's files and I just want to count the java, xml and so on.</p>
<p>Is there some kind of tool who does ... | 3,897 | 1,783,632 | 2014-04-24 11:55:27 | 23,268,140 | 17 | 2014-04-24 11:53:19 | 880,584 | 2014-04-24 11:53:19 | https://stackoverflow.com/q/23268042 | https://stackoverflow.com/a/23268140 | <p>Does</p>
<pre><code> git diff --stat branch1..branch2 -- '*.java' '*.xml'
</code></pre>
<p>do the job for you?</p>
<p>For me it does, but with <code>*.c</code> and <code>*.h</code>.</p>
| <p>Does</p> <pre><code> git diff --stat branch1..branch2 -- '*.java' '*.xml' </code></pre> <p>do the job for you?</p> <p>For me it does, but with <code>*.c</code> and <code>*.h</code>.</p> | 119 | git | <h1>how to see changed lines of code between 2 branches for specific file type?</h1>
<p>I want to create a metric that shows me "changed lines of code" per "Bug" between two Versions (in my case branches in git).</p>
<p>Because our application has a lot of .swf files, I don't need to count those swf's files and I jus... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 21,441 | git | # how to see changed lines of code between 2 branches for specific file type?
I want to create a metric that shows me "changed lines of code" per "Bug" between two Versions (in my case branches in git).
Because our application has a lot of .swf files, I don't need to count those swf's files and I just want to count t... | Does
```
git diff --stat branch1..branch2 -- '*.java' '*.xml'
```
do the job for you?
For me it does, but with `*.c` and `*.h`. |
19651040 | Git: How to find all branches that were never merged back into master | 6 | 2013-10-29 06:16:42 | <p>We have a fairly large GIT repo and I would like to remove branches that were never merged back into master.</p>
<p>The reverse is fine too - a way to list all branches that have been merged into master at some point.</p>
<p>I would like a get a list to begin with rather then simply deleting the branches right awa... | 1,159 | 432,509 | 2013-10-29 06:22:02 | 19,651,058 | 17 | 2013-10-29 06:18:21 | 17,875 | 2013-10-29 06:18:21 | https://stackoverflow.com/q/19651040 | https://stackoverflow.com/a/19651058 | <p><code>git branch --no-merged master</code></p>
<p>Or for the other way, <code>git branch --merged master</code></p>
<p><a href="http://git-scm.com/docs/git-branch">docs</a></p>
| <p><code>git branch --no-merged master</code></p> <p>Or for the other way, <code>git branch --merged master</code></p> <p><a href="http://git-scm.com/docs/git-branch">docs</a></p> | 119, 53847 | branching-and-merging, git | <h1>Git: How to find all branches that were never merged back into master</h1>
<p>We have a fairly large GIT repo and I would like to remove branches that were never merged back into master.</p>
<p>The reverse is fine too - a way to list all branches that have been merged into master at some point.</p>
<p>I would lik... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 21,442 | git | # Git: How to find all branches that were never merged back into master
We have a fairly large GIT repo and I would like to remove branches that were never merged back into master.
The reverse is fine too - a way to list all branches that have been merged into master at some point.
I would like a get a list to begin... | `git branch --no-merged master`
Or for the other way, `git branch --merged master`
[docs](http://git-scm.com/docs/git-branch) |
3269202 | latitude and longitude bounding box for C#? | 6 | 2010-07-16 22:10:57 | <p>I just want to find a straightforward, C# class that takes in a starting latitude and longitude and a distance and finds the bounding box (max lat, min lat, max lon, min lon). There are other, similar, questions here on SO but none of them really answer this and the ones that do are not in C#.</p>
<p>Help.</p>
| 11,823 | 208,127 | 2014-07-28 05:26:09 | 14,315,990 | 17 | 2013-01-14 09:39:07 | 687,190 | 2014-07-28 05:26:09 | https://stackoverflow.com/q/3269202 | https://stackoverflow.com/a/14315990 | <p>Here's what you are asking for. Kudos to Federico A. Ramponi who wrote the original in Python <a href="https://stackoverflow.com/questions/238260/how-to-calculate-the-bounding-box-for-a-given-lat-lng-location">here</a>.</p>
<pre><code>public class MapPoint
{
public double Longitude { get; set; } // In Degrees
... | <p>Here's what you are asking for. Kudos to Federico A. Ramponi who wrote the original in Python <a href="https://stackoverflow.com/questions/238260/how-to-calculate-the-bounding-box-for-a-given-lat-lng-location">here</a>.</p> <pre><code>public class MapPoint { public double Longitude { get; set; } // In Degrees ... | 9, 2965, 10580, 20301 | c#, geocoding, geolocation, latitude-longitude | <h1>latitude and longitude bounding box for C#?</h1>
<p>I just want to find a straightforward, C# class that takes in a starting latitude and longitude and a distance and finds the bounding box (max lat, min lat, max lon, min lon). There are other, similar, questions here on SO but none of them really answer this and t... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 21,443 | git | # latitude and longitude bounding box for C#?
I just want to find a straightforward, C# class that takes in a starting latitude and longitude and a distance and finds the bounding box (max lat, min lat, max lon, min lon). There are other, similar, questions here on SO but none of them really answer this and the ones t... | Here's what you are asking for. Kudos to Federico A. Ramponi who wrote the original in Python [here](https://stackoverflow.com/questions/238260/how-to-calculate-the-bounding-box-for-a-given-lat-lng-location).
```
public class MapPoint
{
public double Longitude { get; set; } // In Degrees
public double Latitude... |
9864728 | How to get Git to clone into current directory | 687 | 2012-03-25 22:39:14 | <p>I'm doing:</p>
<pre><code>git clone ssh://user@host.com/home/user/private/repos/project_hub.git ./
</code></pre>
<p>I'm getting:</p>
<blockquote>
<p>Fatal: destination path '.' already exists and is not an empty
directory.</p>
</blockquote>
<p>I know path . already exists.
And I can assure that directory IS ... | 733,473 | 378,170 | 2022-06-08 15:33:18 | 15,965,134 | 16 | 2013-04-12 07:05:20 | 378,170 | 2022-06-08 15:33:18 | https://stackoverflow.com/q/9864728 | https://stackoverflow.com/a/15965134 | <p>The solution was using the <code>dot</code>,
so:</p>
<pre><code>rm -rf .* && git clone ssh://user@host.com/home/user/private/repos/project_hub.git .`
</code></pre>
<p><code>rm -rf .* &&</code> may be omitted if we are absolutely sure that the directory is empty.</p>
<p>Credits go to:
@James McLaughli... | <p>The solution was using the <code>dot</code>, so:</p> <pre><code>rm -rf .* && git clone ssh://user@host.com/home/user/private/repos/project_hub.git .` </code></pre> <p><code>rm -rf .* &&</code> may be omitted if we are absolutely sure that the directory is empty.</p> <p>Credits go to: @James McLaughli... | 119, 34099 | git, git-clone | <h1>How to get Git to clone into current directory</h1>
<p>I'm doing:</p>
<pre><code>git clone ssh://user@host.com/home/user/private/repos/project_hub.git ./
</code></pre>
<p>I'm getting:</p>
<blockquote>
<p>Fatal: destination path '.' already exists and is not an empty
directory.</p>
</blockquote>
<p>I know pa... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 21,445 | git | # How to get Git to clone into current directory
I'm doing:
```
git clone ssh://user@host.com/home/user/private/repos/project_hub.git ./
```
I'm getting:
> Fatal: destination path '.' already exists and is not an empty
> directory.
I know path . already exists.
And I can assure that directory IS empty. (I do ls in... | The solution was using the `dot`,
so:
```
rm -rf .* && git clone ssh://user@host.com/home/user/private/repos/project_hub.git .`
```
`rm -rf .* &&` may be omitted if we are absolutely sure that the directory is empty.
Credits go to:
@James McLaughlin on comments |
38450276 | Force git to update .gitignore | 165 | 2016-07-19 05:36:05 | <p>I have a <code>.gitignore</code> file, and it's ignoring some files. I have updated the <code>.gitignore</code> file (removed some filenames and added some filenames). This is not reflected in <code>git status</code>. How can I force git to update these changes, so that track files which are not tracked before and v... | 221,701 | null | 2026-01-07 04:47:08 | 38,457,665 | 16 | 2016-07-19 11:47:31 | 3,966,458 | 2019-04-15 16:28:20 | https://stackoverflow.com/q/38450276 | https://stackoverflow.com/a/38457665 | <p>If you want to add all files, delete all filenames from <code>.gitignore</code> file, not the <code>.gitignore</code> file and <code>commit</code> it, then try</p>
<p><code>git config --global core.excludesfile ~/.gitignore_global</code></p>
<p>Some files are ignored by the git depending on the OS (like .dll in wi... | <p>If you want to add all files, delete all filenames from <code>.gitignore</code> file, not the <code>.gitignore</code> file and <code>commit</code> it, then try</p> <p><code>git config --global core.excludesfile ~/.gitignore_global</code></p> <p>Some files are ignored by the git depending on the OS (like .dll in wi... | 119, 25056 | git, gitignore | <h1>Force git to update .gitignore</h1>
<p>I have a <code>.gitignore</code> file, and it's ignoring some files. I have updated the <code>.gitignore</code> file (removed some filenames and added some filenames). This is not reflected in <code>git status</code>. How can I force git to update these changes, so that track ... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 21,446 | git | # Force git to update .gitignore
I have a `.gitignore` file, and it's ignoring some files. I have updated the `.gitignore` file (removed some filenames and added some filenames). This is not reflected in `git status`. How can I force git to update these changes, so that track files which are not tracked before and vic... | If you want to add all files, delete all filenames from `.gitignore` file, not the `.gitignore` file and `commit` it, then try
`git config --global core.excludesfile ~/.gitignore_global`
Some files are ignored by the git depending on the OS (like .dll in windows). For more [information](https://help.github.com/articl... |
4944376 | How to check real git diff before merging from remote branch? | 70 | 2011-02-09 11:42:59 | <p>I want to check the real diff between remote branch and local branch. How can I do that?</p>
<p>Issuing the below command partially works, but it shows the diff of the new changes of my local branch too.</p>
<pre><code>git diff remote/branch
</code></pre>
| 66,049 | 235,453 | 2015-07-22 00:19:32 | 4,944,548 | 16 | 2011-02-09 11:58:19 | 241,482 | 2012-10-26 01:17:14 | https://stackoverflow.com/q/4944376 | https://stackoverflow.com/a/4944548 | <p>From the <a href="http://www.kernel.org/pub/software/scm/git/docs/git-diff.html" rel="noreferrer">documentation</a>:</p>
<blockquote>
<pre><code>git diff [--options] <commit>...<commit> [--] [<path>…]
</code></pre>
<p>This form is to view the changes on
the branch containing and up to the
... | <p>From the <a href="http://www.kernel.org/pub/software/scm/git/docs/git-diff.html" rel="noreferrer">documentation</a>:</p> <blockquote> <pre><code>git diff [--options] <commit>...<commit> [--] [<path>…] </code></pre> <p>This form is to view the changes on the branch containing and up to the ... | 119, 606 | diff, git | <h1>How to check real git diff before merging from remote branch?</h1>
<p>I want to check the real diff between remote branch and local branch. How can I do that?</p>
<p>Issuing the below command partially works, but it shows the diff of the new changes of my local branch too.</p>
<pre><code>git diff remote/branch
</... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 21,447 | git | # How to check real git diff before merging from remote branch?
I want to check the real diff between remote branch and local branch. How can I do that?
Issuing the below command partially works, but it shows the diff of the new changes of my local branch too.
```
git diff remote/branch
``` | From the [documentation](http://www.kernel.org/pub/software/scm/git/docs/git-diff.html):
> ```
> git diff [--options] <commit>...<commit> [--] [<path>…]
> ```
>
> This form is to view the changes on
> the branch containing and up to the
> second `<commit>`, starting at a common
> ancestor of both `<commit>`. "git diff... |
2360944 | How do I correctly install dulwich to get hg-git working on Windows? | 61 | 2010-03-02 04:40:47 | <p>I'm trying to use the hg-git Mercurial extension on Windows (Windows 7 64-bit, to be specific). I have Mercurial and Git installed. I have Python 2.5 (32-bit) installed.</p>
<p>I followed the instructions on <a href="http://hg-git.github.com/" rel="noreferrer">http://hg-git.github.com/</a> to install the extension.... | 16,608 | 156,533 | 2021-09-23 05:03:57 | 2,733,516 | 16 | 2010-04-28 22:25:07 | 239,247 | 2018-02-22 12:10:10 | https://stackoverflow.com/q/2360944 | https://stackoverflow.com/a/2733516 | <blockquote>
<p>That makes me think dulwich is not
installed correctly, or not in the
path.</p>
</blockquote>
<p>You're absolutely right. Mercurial binary distributions for Windows are 'frozen' - they use the Python code and interpreter bundled with them and therefore independent of packages installed in system ... | <blockquote> <p>That makes me think dulwich is not installed correctly, or not in the path.</p> </blockquote> <p>You're absolutely right. Mercurial binary distributions for Windows are 'frozen' - they use the Python code and interpreter bundled with them and therefore independent of packages installed in system ... | 16, 64, 802, 51230, 70888 | dulwich, hg-git, mercurial, python, windows | <h1>How do I correctly install dulwich to get hg-git working on Windows?</h1>
<p>I'm trying to use the hg-git Mercurial extension on Windows (Windows 7 64-bit, to be specific). I have Mercurial and Git installed. I have Python 2.5 (32-bit) installed.</p>
<p>I followed the instructions on <a href="http://hg-git.github.... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 21,448 | git | # How do I correctly install dulwich to get hg-git working on Windows?
I'm trying to use the hg-git Mercurial extension on Windows (Windows 7 64-bit, to be specific). I have Mercurial and Git installed. I have Python 2.5 (32-bit) installed.
I followed the instructions on <http://hg-git.github.com/> to install the ext... | > That makes me think dulwich is not
> installed correctly, or not in the
> path.
You're absolutely right. Mercurial binary distributions for Windows are 'frozen' - they use the Python code and interpreter bundled with them and therefore independent of packages installed in system PYTHONPATH. When you specify path to ... |
1598260 | Make Git "LF will be replaced by CRLF" warnings go away | 54 | 2009-10-21 01:18:40 | <p>I have setup Git so it doesn't commit inconsistent line endings. The problem with that is a whole pile of files appear modified even though they are not. What do I type to make these files have the line endings fixed on the local side?</p>
<pre><code># git checkout dev
M src/au/policy/dao/EmailQueue.java
M src/... | 61,852 | 150,172 | 2023-02-02 21:58:18 | 1,599,033 | 16 | 2009-10-21 06:23:35 | 19,563 | 2009-10-21 06:23:35 | https://stackoverflow.com/q/1598260 | https://stackoverflow.com/a/1599033 | <p>You can just delete and re-checkout the offending files from the index like this:</p>
<pre><code>rm <files>
git checkout -- <files>
</code></pre>
<p>Or, if they are the only modified files (be careful with this command), you can script it like this:</p>
<pre><code>git diff --name-only --diff-filter=M ... | <p>You can just delete and re-checkout the offending files from the index like this:</p> <pre><code>rm <files> git checkout -- <files> </code></pre> <p>Or, if they are the only modified files (be careful with this command), you can script it like this:</p> <pre><code>git diff --name-only --diff-filter=M ... | 119 | git | <h1>Make Git "LF will be replaced by CRLF" warnings go away</h1>
<p>I have setup Git so it doesn't commit inconsistent line endings. The problem with that is a whole pile of files appear modified even though they are not. What do I type to make these files have the line endings fixed on the local side?</p>
<pre><code>... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 21,449 | git | # Make Git "LF will be replaced by CRLF" warnings go away
I have setup Git so it doesn't commit inconsistent line endings. The problem with that is a whole pile of files appear modified even though they are not. What do I type to make these files have the line endings fixed on the local side?
```
# git checkout dev
M... | You can just delete and re-checkout the offending files from the index like this:
```
rm <files>
git checkout -- <files>
```
Or, if they are the only modified files (be careful with this command), you can script it like this:
```
git diff --name-only --diff-filter=M | xargs rm --
git checkout -- .
```
On a GNU syst... |
6922700 | Tag a remote git repository without cloning it | 51 | 2011-08-03 06:53:54 | <p>Is there a way to tag a remote git repository <em>without having cloned it</em> locally?</p>
<p>In order to correlate a code repository with a config repository, I want to (as a CI build step) tag whatever is the current head of the config repository with build-n (where N is the current build number provided by jen... | 18,068 | 144,135 | 2024-04-25 08:14:58 | 6,928,854 | 16 | 2011-08-03 15:17:44 | 850,181 | 2011-08-03 15:17:44 | https://stackoverflow.com/q/6922700 | https://stackoverflow.com/a/6928854 | <p>To have this as an answer: there is at the moment no way to do remote tagging with git, but if you have access in some way to the remote (bare) repository, you may be able to tag on the remote location.</p>
<p>For example, if you access the git repository via SSH, you can login using SSH, go to the (bare) repositor... | <p>To have this as an answer: there is at the moment no way to do remote tagging with git, but if you have access in some way to the remote (bare) repository, you may be able to tag on the remote location.</p> <p>For example, if you access the git repository via SSH, you can login using SSH, go to the (bare) repositor... | 115, 119 | git, tags | <h1>Tag a remote git repository without cloning it</h1>
<p>Is there a way to tag a remote git repository <em>without having cloned it</em> locally?</p>
<p>In order to correlate a code repository with a config repository, I want to (as a CI build step) tag whatever is the current head of the config repository with buil... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 21,450 | git | # Tag a remote git repository without cloning it
Is there a way to tag a remote git repository *without having cloned it* locally?
In order to correlate a code repository with a config repository, I want to (as a CI build step) tag whatever is the current head of the config repository with build-n (where N is the cur... | To have this as an answer: there is at the moment no way to do remote tagging with git, but if you have access in some way to the remote (bare) repository, you may be able to tag on the remote location.
For example, if you access the git repository via SSH, you can login using SSH, go to the (bare) repository and exec... |
3095737 | Is there a way to limit the amount of memory that "git gc" uses? | 51 | 2010-06-22 17:58:15 | <p>I'm hosting a git repo on a shared host. My repo necessarily has a couple of very large files in it, and every time I try to run "git gc" on the repo now, my process gets killed by the shared hosting provider for using too much memory. Is there a way to limit the amount of memory that git gc can consume? My hope ... | 33,568 | 144,840 | 2024-03-03 13:45:51 | 3,095,784 | 16 | 2010-06-22 18:05:04 | 19,563 | 2010-06-22 18:05:04 | https://stackoverflow.com/q/3095737 | https://stackoverflow.com/a/3095784 | <p>Yes, have a look at the help page for <code>git config</code> and look at the <code>pack.*</code> options, specifically <code>pack.depth</code>, <code>pack.window</code>, <code>pack.windowMemory</code> and <code>pack.deltaCacheSize</code>.</p>
<p>It's not a totally exact size as git needs to map each object into me... | <p>Yes, have a look at the help page for <code>git config</code> and look at the <code>pack.*</code> options, specifically <code>pack.depth</code>, <code>pack.window</code>, <code>pack.windowMemory</code> and <code>pack.deltaCacheSize</code>.</p> <p>It's not a totally exact size as git needs to map each object into me... | 61, 119, 11558, 44929 | dreamhost, git, git-gc, memory | <h1>Is there a way to limit the amount of memory that "git gc" uses?</h1>
<p>I'm hosting a git repo on a shared host. My repo necessarily has a couple of very large files in it, and every time I try to run "git gc" on the repo now, my process gets killed by the shared hosting provider for using too much memory. Is th... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 21,451 | git | # Is there a way to limit the amount of memory that "git gc" uses?
I'm hosting a git repo on a shared host. My repo necessarily has a couple of very large files in it, and every time I try to run "git gc" on the repo now, my process gets killed by the shared hosting provider for using too much memory. Is there a way t... | Yes, have a look at the help page for `git config` and look at the `pack.*` options, specifically `pack.depth`, `pack.window`, `pack.windowMemory` and `pack.deltaCacheSize`.
It's not a totally exact size as git needs to map each object into memory so one very large object can cause a lot of memory usage regardless of ... |
498110 | Converting a repository from git to subversion | 47 | 2009-01-31 02:55:45 | <p>Reasons for doing this aside, is there a reasonable way to <strong>convert an entire git repository to subversion</strong>?</p>
<p>I can find only tons on information on migrating <em>from</em> subversion <em>to</em> git, and exchanging changesets between the two, but not for doing a simple conversion of the entire... | 23,666 | 3,002 | 2019-06-20 12:14:02 | 498,131 | 16 | 2009-01-31 03:04:13 | 893 | 2009-01-31 03:36:27 | https://stackoverflow.com/q/498110 | https://stackoverflow.com/a/498131 | <p>The general problem with doing conversions this direction is that Git repositories can contain more than just a linear history of revisions, as Subversion would expect. Multiple ancestries with divergent histories and frequent merge commits are all possible, which can't be easily represented in a Subversion reposito... | <p>The general problem with doing conversions this direction is that Git repositories can contain more than just a linear history of revisions, as Subversion would expect. Multiple ancestries with divergent histories and frequent merge commits are all possible, which can't be easily represented in a Subversion reposito... | 63, 119, 456 | git, svn, version-control | <h1>Converting a repository from git to subversion</h1>
<p>Reasons for doing this aside, is there a reasonable way to <strong>convert an entire git repository to subversion</strong>?</p>
<p>I can find only tons on information on migrating <em>from</em> subversion <em>to</em> git, and exchanging changesets between the ... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 21,452 | git | # Converting a repository from git to subversion
Reasons for doing this aside, is there a reasonable way to **convert an entire git repository to subversion**?
I can find only tons on information on migrating *from* subversion *to* git, and exchanging changesets between the two, but not for doing a simple conversion ... | The general problem with doing conversions this direction is that Git repositories can contain more than just a linear history of revisions, as Subversion would expect. Multiple ancestries with divergent histories and frequent merge commits are all possible, which can't be easily represented in a Subversion repository.... |
44031257 | Find city name and country from latitude and longitude in Swift | 44 | 2017-05-17 17:22:21 | <p>I'm working on application in Swift3
and I have letter problem i can't find the answer for it. </p>
<p>How can I know city name and country short names base on latitude and longitude? </p>
<pre><code>import UIKit
import CoreLocation
class ViewController: UIViewController, CLLocationManagerDelegate{
let loc... | 62,716 | 8,021,450 | 2025-10-30 08:25:22 | 44,031,412 | 16 | 2017-05-17 17:30:57 | 4,511,620 | 2017-05-17 20:29:30 | https://stackoverflow.com/q/44031257 | https://stackoverflow.com/a/44031412 | <p>I would recommend integrating <a href="https://developers.google.com/maps/" rel="noreferrer">Google Maps API</a> with your project. If you do, your task can be achieved using <a href="https://developers.google.com/maps/documentation/javascript/examples/geocoding-reverse" rel="noreferrer">Reverse Geocoding</a> Google... | <p>I would recommend integrating <a href="https://developers.google.com/maps/" rel="noreferrer">Google Maps API</a> with your project. If you do, your task can be achieved using <a href="https://developers.google.com/maps/documentation/javascript/examples/geocoding-reverse" rel="noreferrer">Reverse Geocoding</a> Google... | 1597, 20301, 22658, 58338, 104797 | core-location, ios, latitude-longitude, location, swift | <h1>Find city name and country from latitude and longitude in Swift</h1>
<p>I'm working on application in Swift3
and I have letter problem i can't find the answer for it. </p>
<p>How can I know city name and country short names base on latitude and longitude? </p>
<pre><code>import UIKit
import CoreLocation
class... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 21,453 | git | # Find city name and country from latitude and longitude in Swift
I'm working on application in Swift3
and I have letter problem i can't find the answer for it.
How can I know city name and country short names base on latitude and longitude?
```
import UIKit
import CoreLocation
class ViewController: UIViewControlle... | I would recommend integrating [Google Maps API](https://developers.google.com/maps/) with your project. If you do, your task can be achieved using [Reverse Geocoding](https://developers.google.com/maps/documentation/javascript/examples/geocoding-reverse) Google provides.
Furthermore, Google there is [Google Maps SDK](... |
12061645 | Generating a GPG key for git tagging | 44 | 2012-08-21 19:23:34 | <p>I'm trying to create signed tags in GitHub using the git command line. I generated a GPG key with a (sample) username <code>Full Name (skytreader) <fullname@gmail.com></code>. Having done that, I try to create a <a href="https://git-scm.com/book/en/v2/Git-Tools-Signing-Your-Work" rel="noreferrer">signed tag</a... | 27,798 | 777,225 | 2022-08-17 14:19:26 | 12,062,216 | 16 | 2012-08-21 20:04:57 | 877,115 | 2012-08-21 20:04:57 | https://stackoverflow.com/q/12061645 | https://stackoverflow.com/a/12062216 | <p>The committer name is located in your <code>~/.gitconfig</code> file. Change that entry to a real name (which is how you want to be committing, anyway). You can edit the file in your favorite editor, or just issue:</p>
<pre><code>git config --global user.name "<name>"
</code></pre>
| <p>The committer name is located in your <code>~/.gitconfig</code> file. Change that entry to a real name (which is how you want to be committing, anyway). You can edit the file in your favorite editor, or just issue:</p> <pre><code>git config --global user.name "<name>" </code></pre> | 119, 6735 | git, gnupg | <h1>Generating a GPG key for git tagging</h1>
<p>I'm trying to create signed tags in GitHub using the git command line. I generated a GPG key with a (sample) username <code>Full Name (skytreader) <fullname@gmail.com></code>. Having done that, I try to create a <a href="https://git-scm.com/book/en/v2/Git-Tools-Sig... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 21,454 | git | # Generating a GPG key for git tagging
I'm trying to create signed tags in GitHub using the git command line. I generated a GPG key with a (sample) username `Full Name (skytreader) <fullname@gmail.com>`. Having done that, I try to create a [signed tag](https://git-scm.com/book/en/v2/Git-Tools-Signing-Your-Work). Howev... | The committer name is located in your `~/.gitconfig` file. Change that entry to a real name (which is how you want to be committing, anyway). You can edit the file in your favorite editor, or just issue:
```
git config --global user.name "<name>"
``` |
16527215 | How to make 'git diff' ignore comments | 43 | 2013-05-13 16:52:29 | <p>I am trying to produce a list of the files that were changed in a specific commit. The problem is, that every file has the version number in a comment at the top of the file - and since this commit introduces a new version, that means that <em>every file has changed</em>.</p>
<p>I don't care about the changed commen... | 27,595 | 494,643 | 2024-09-26 01:19:03 | 21,674,411 | 16 | 2014-02-10 10:19:35 | 129,269 | 2020-06-23 20:49:54 | https://stackoverflow.com/q/16527215 | https://stackoverflow.com/a/21674411 | <pre><code>git diff -G <regex>
</code></pre>
<p>And specify a regular expression that does <em>not</em> match your version number line.</p>
| <pre><code>git diff -G <regex> </code></pre> <p>And specify a regular expression that does <em>not</em> match your version number line.</p> | 119, 606, 9033 | diff, git, git-diff | <h1>How to make 'git diff' ignore comments</h1>
<p>I am trying to produce a list of the files that were changed in a specific commit. The problem is, that every file has the version number in a comment at the top of the file - and since this commit introduces a new version, that means that <em>every file has changed</e... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 21,455 | git | # How to make 'git diff' ignore comments
I am trying to produce a list of the files that were changed in a specific commit. The problem is, that every file has the version number in a comment at the top of the file - and since this commit introduces a new version, that means that *every file has changed*.
I don't car... | ```
git diff -G <regex>
```
And specify a regular expression that does *not* match your version number line. |
8721984 | Git: Ignore files for public repository, but not for private | 37 | 2012-01-04 04:23:25 | <p>I'm deploying a Rails app on Heroku (for now) via git, and would also like to have a public version for people to look at. Some files are sensitive and should only be committed and pushed in the "heroku" branch, but not the "public" branch. <strong>What is the best way to go about this?</strong></p>
<p>(I <em>do</e... | 7,781 | 885,036 | 2015-08-05 03:31:33 | 8,859,902 | 16 | 2012-01-14 03:23:33 | 671,934 | 2012-01-23 04:41:56 | https://stackoverflow.com/q/8721984 | https://stackoverflow.com/a/8859902 | <p>I will second the submodule answer, but try to provide some clarification. First, git does not deal with files but with commits. There is no way to filter files or paths in a branch because a branch is really a pointer to a commit. When you exclude or ignore you are just keeping files from being added to your reposi... | <p>I will second the submodule answer, but try to provide some clarification. First, git does not deal with files but with commits. There is no way to filter files or paths in a branch because a branch is really a pointer to a commit. When you exclude or ignore you are just keeping files from being added to your reposi... | 119, 456 | git, version-control | <h1>Git: Ignore files for public repository, but not for private</h1>
<p>I'm deploying a Rails app on Heroku (for now) via git, and would also like to have a public version for people to look at. Some files are sensitive and should only be committed and pushed in the "heroku" branch, but not the "public" branch. <stron... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 21,456 | git | # Git: Ignore files for public repository, but not for private
I'm deploying a Rails app on Heroku (for now) via git, and would also like to have a public version for people to look at. Some files are sensitive and should only be committed and pushed in the "heroku" branch, but not the "public" branch. **What is the b... | I will second the submodule answer, but try to provide some clarification. First, git does not deal with files but with commits. There is no way to filter files or paths in a branch because a branch is really a pointer to a commit. When you exclude or ignore you are just keeping files from being added to your repositor... |
5602204 | How to invert `git log --grep=<pattern>` or How to show git logs that don't match a pattern | 37 | 2011-04-09 01:05:40 | <p>I want to use <code>git log</code> to show all commits that do not match a given pattern. I know I can use the following to show all commits that do match a pattern:</p>
<pre><code>git log --grep=<pattern>
</code></pre>
<p>How do I invert the sense of matching?</p>
<p>I am trying to ignore commits that have... | 22,315 | 101,911 | 2024-09-19 17:13:23 | 5,606,450 | 16 | 2011-04-09 17:02:42 | 123,109 | 2011-04-09 17:14:29 | https://stackoverflow.com/q/5602204 | https://stackoverflow.com/a/5606450 | <p>Generate a list of all commits, subtract those whose log messages contain the offending pattern, and feed the result to <code>git log</code> with your desired options. In the final stage, a couple of options to <code>git log</code> are handy:</p>
<blockquote>
<p><code>--stdin</code><br>
In addition to the <em>c... | <p>Generate a list of all commits, subtract those whose log messages contain the offending pattern, and feed the result to <code>git log</code> with your desired options. In the final stage, a couple of options to <code>git log</code> are handy:</p> <blockquote> <p><code>--stdin</code><br> In addition to the <em>c... | 119, 47913 | git, git-log | <h1>How to invert `git log --grep=<pattern>` or How to show git logs that don't match a pattern</h1>
<p>I want to use <code>git log</code> to show all commits that do not match a given pattern. I know I can use the following to show all commits that do match a pattern:</p>
<pre><code>git log --grep=<pattern>
</c... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 21,457 | git | # How to invert `git log --grep=` or How to show git logs that don't match a pattern
I want to use `git log` to show all commits that do not match a given pattern. I know I can use the following to show all commits that do match a pattern:
```
git log --grep=<pattern>
```
How do I invert the sense of matching?
I am... | Generate a list of all commits, subtract those whose log messages contain the offending pattern, and feed the result to `git log` with your desired options. In the final stage, a couple of options to `git log` are handy:
> `--stdin`
> In addition to the *commit* listed on the command line, read them from the standar... |
27076254 | What's the difference between git "--track" and "--set-upstream-to"? | 36 | 2014-11-22 10:17:58 | <p>As I can see, both git <code>--track</code> and <code>--set-upstream-to</code> modify a branch so it becames a tracking (or upstream) branch. But where is a subtle difference I can't comprehend. The <code>--track</code> records "remote branch tracks local":</p>
<pre><code>$ git checkout foo -b
$ git branch --track ... | 6,819 | 69,882 | 2022-08-02 06:33:34 | 27,076,349 | 16 | 2014-11-22 10:29:47 | 6,309 | 2022-08-02 06:33:34 | https://stackoverflow.com/q/27076254 | https://stackoverflow.com/a/27076349 | <pre><code>$ git checkout foo -b
$ git branch --track origin/retarget
</code></pre>
<p>The first two commands instruct git to:</p>
<ul>
<li>create a local branch named "<code>origin/retarget</code>" (very bad idea, as it is named as a remote tracking branch", while it is actually a simple local branch wi... | <pre><code>$ git checkout foo -b $ git branch --track origin/retarget </code></pre> <p>The first two commands instruct git to:</p> <ul> <li>create a local branch named "<code>origin/retarget</code>" (very bad idea, as it is named as a remote tracking branch", while it is actually a simple local branch wi... | 119 | git | <h1>What's the difference between git "--track" and "--set-upstream-to"?</h1>
<p>As I can see, both git <code>--track</code> and <code>--set-upstream-to</code> modify a branch so it becames a tracking (or upstream) branch. But where is a subtle difference I can't comprehend. The <code>--track</code> records "remote bra... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 21,458 | git | # What's the difference between git "--track" and "--set-upstream-to"?
As I can see, both git `--track` and `--set-upstream-to` modify a branch so it becames a tracking (or upstream) branch. But where is a subtle difference I can't comprehend. The `--track` records "remote branch tracks local":
```
$ git checkout foo... | ```
$ git checkout foo -b
$ git branch --track origin/retarget
```
The first two commands instruct git to:
- create a local branch named "`origin/retarget`" (very bad idea, as it is named as a remote tracking branch", while it is actually a simple local branch with a '`/`' in its name)
- starting from the current bra... |
9909604 | How does git-svn handle line endings? | 36 | 2012-03-28 14:27:12 | <p>I'm pretty happy with how Git itself handles line endings, via <code>core.autocrlf</code>, <code>core.eol</code> + gitattributes (<a href="http://adaptivepatchwork.com/2012/03/01/mind-the-end-of-your-line/">Tim's post is excellent</a>).</p>
<p>I have a Windows Git repo that has <code>autocrlf</code> set to <code>tr... | 6,602 | 88,374 | 2017-02-08 23:12:39 | 9,919,085 | 16 | 2012-03-29 04:29:23 | 64,257 | 2012-03-29 19:12:06 | https://stackoverflow.com/q/9909604 | https://stackoverflow.com/a/9919085 | <p>I'm interested in this too. Supposing you have a repo that was created via git svn clone, I think you could break it down into three different questions:</p>
<ol>
<li>Does any git newline normalization/alteration happen at git svn fetch time, in moving commits from svn to the git repo?</li>
<li>Does any git newline... | <p>I'm interested in this too. Supposing you have a repo that was created via git svn clone, I think you could break it down into three different questions:</p> <ol> <li>Does any git newline normalization/alteration happen at git svn fetch time, in moving commits from svn to the git repo?</li> <li>Does any git newline... | 3705, 6452, 12863, 59139 | core.autocrlf, eol, git-svn, newline | <h1>How does git-svn handle line endings?</h1>
<p>I'm pretty happy with how Git itself handles line endings, via <code>core.autocrlf</code>, <code>core.eol</code> + gitattributes (<a href="http://adaptivepatchwork.com/2012/03/01/mind-the-end-of-your-line/">Tim's post is excellent</a>).</p>
<p>I have a Windows Git repo... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 21,459 | git | # How does git-svn handle line endings?
I'm pretty happy with how Git itself handles line endings, via `core.autocrlf`, `core.eol` + gitattributes ([Tim's post is excellent](http://adaptivepatchwork.com/2012/03/01/mind-the-end-of-your-line/)).
I have a Windows Git repo that has `autocrlf` set to `true`. So, all text ... | I'm interested in this too. Supposing you have a repo that was created via git svn clone, I think you could break it down into three different questions:
1. Does any git newline normalization/alteration happen at git svn fetch time, in moving commits from svn to the git repo?
2. Does any git newline normalization/alte... |
9777564 | git-subtree pull complications | 33 | 2012-03-19 20:37:45 | <p>We have been trying to get <a href="https://github.com/apenwarr/git-subtree" rel="noreferrer">git-subtree</a> working on a project (with git version 1.7.9.4) and have run into a bit of a complication. Someone else previous added the subtree with this command some months ago: </p>
<pre><code>git subtree add --prefix... | 22,351 | 673,759 | 2025-04-04 14:52:38 | 10,698,924 | 16 | 2012-05-22 09:05:36 | 114,168 | 2012-05-22 09:17:19 | https://stackoverflow.com/q/9777564 | https://stackoverflow.com/a/10698924 | <p>I had the same problem, and in my case it seems to be due to the initial subtree commit being merge-squashed into the master branch.</p>
<p>Looking through the subtree source I found this: <a href="https://github.com/git/git/blob/master/contrib/subtree/git-subtree.sh#L224">https://github.com/git/git/blob/master/con... | <p>I had the same problem, and in my case it seems to be due to the initial subtree commit being merge-squashed into the master branch.</p> <p>Looking through the subtree source I found this: <a href="https://github.com/git/git/blob/master/contrib/subtree/git-subtree.sh#L224">https://github.com/git/git/blob/master/con... | 119, 717, 68200 | git, git-subtree, merge | <h1>git-subtree pull complications</h1>
<p>We have been trying to get <a href="https://github.com/apenwarr/git-subtree" rel="noreferrer">git-subtree</a> working on a project (with git version 1.7.9.4) and have run into a bit of a complication. Someone else previous added the subtree with this command some months ago: <... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 21,461 | git | # git-subtree pull complications
We have been trying to get [git-subtree](https://github.com/apenwarr/git-subtree) working on a project (with git version 1.7.9.4) and have run into a bit of a complication. Someone else previous added the subtree with this command some months ago:
```
git subtree add --prefix=foo git@... | I had the same problem, and in my case it seems to be due to the initial subtree commit being merge-squashed into the master branch.
Looking through the subtree source I found this: <https://github.com/git/git/blob/master/contrib/subtree/git-subtree.sh#L224>
It looks like subtree greps your git log for `git-subtree-d... |
3109456 | Push local Git branch to origin | 32 | 2010-06-24 11:22:05 | <p>I'm working on two machines and origin repo on third one (origin is accessible from the other two, no direct connection between machine1 and machine2).</p>
<pre><code># Machine 1
$ git branch
master
* testing
cms
# Machine 2
$ git branch
* master
</code></pre>
<p>Now, I want to push the <code>testing</code> b... | 52,166 | 234,780 | 2015-09-11 08:29:44 | 3,109,525 | 16 | 2010-06-24 11:33:48 | 372,696 | 2014-06-24 01:17:52 | https://stackoverflow.com/q/3109456 | https://stackoverflow.com/a/3109525 | <p>You have successfully pushed the testing branch to origin so now you just need to get the branch to machine2.</p>
<p>Not sure of the state of teh repo on machine2 so I would delete the directory (Or create a new one to use) and just clone the repo on Machine2 and checkout testing ...</p>
<p>So on Machine2 in an em... | <p>You have successfully pushed the testing branch to origin so now you just need to get the branch to machine2.</p> <p>Not sure of the state of teh repo on machine2 so I would delete the directory (Or create a new one to use) and just clone the repo on Machine2 and checkout testing ...</p> <p>So on Machine2 in an em... | 119 | git | <h1>Push local Git branch to origin</h1>
<p>I'm working on two machines and origin repo on third one (origin is accessible from the other two, no direct connection between machine1 and machine2).</p>
<pre><code># Machine 1
$ git branch
master
* testing
cms
# Machine 2
$ git branch
* master
</code></pre>
<p>Now, ... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 21,464 | git | # Push local Git branch to origin
I'm working on two machines and origin repo on third one (origin is accessible from the other two, no direct connection between machine1 and machine2).
```
# Machine 1
$ git branch
master
* testing
cms
# Machine 2
$ git branch
* master
```
Now, I want to push the `testing` bran... | You have successfully pushed the testing branch to origin so now you just need to get the branch to machine2.
Not sure of the state of teh repo on machine2 so I would delete the directory (Or create a new one to use) and just clone the repo on Machine2 and checkout testing ...
So on Machine2 in an empty dir (new or c... |
34913989 | Cancel git merge but keep local changes | 27 | 2016-01-21 01:47:17 | <p>I started a git merge, but made local changes that I want to keep. I no longer want to merge, and instead continue to work on the local changes. How do I do this?</p>
| 12,312 | 149,482 | 2022-01-20 02:00:46 | 70,779,971 | 16 | 2022-01-20 02:00:46 | 17,979,696 | 2022-01-20 02:00:46 | https://stackoverflow.com/q/34913989 | https://stackoverflow.com/a/70779971 | <p>As per <a href="https://stackoverflow.com/a/56605236">this answer</a> to a similar question, since Git 2.23 (Q3 2019) you can use:</p>
<p><code>git merge --quit</code></p>
<p>This will:</p>
<ul>
<li>Forget about the current merge in progress.</li>
<li>Leave the index and the working tree as-is.</li>
</ul>
| <p>As per <a href="https://stackoverflow.com/a/56605236">this answer</a> to a similar question, since Git 2.23 (Q3 2019) you can use:</p> <p><code>git merge --quit</code></p> <p>This will:</p> <ul> <li>Forget about the current merge in progress.</li> <li>Leave the index and the working tree as-is.</li> </ul> | 119 | git | <h1>Cancel git merge but keep local changes</h1>
<p>I started a git merge, but made local changes that I want to keep. I no longer want to merge, and instead continue to work on the local changes. How do I do this?</p>
| q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 21,465 | git | # Cancel git merge but keep local changes
I started a git merge, but made local changes that I want to keep. I no longer want to merge, and instead continue to work on the local changes. How do I do this? | As per [this answer](https://stackoverflow.com/a/56605236) to a similar question, since Git 2.23 (Q3 2019) you can use:
`git merge --quit`
This will:
- Forget about the current merge in progress.
- Leave the index and the working tree as-is. |
42437590 | What is a git boundary commit | 27 | 2017-02-24 11:33:06 | <p>The <a href="https://git-scm.com/docs/git-log" rel="noreferrer"><code>git log</code> command</a> has a <code>--boundary</code> option, which causes the program to</p>
<blockquote>
<p>Output excluded boundary commits.</p>
</blockquote>
<p>But what is a <em>boundary commit</em>? And when might I want to include th... | 2,828 | 545,127 | 2024-04-16 12:23:31 | 42,438,211 | 16 | 2017-02-24 12:05:14 | 6,394,138 | 2024-04-16 12:23:31 | https://stackoverflow.com/q/42437590 | https://stackoverflow.com/a/42438211 | <p>A boundary commit is the commit that limits a revision range but does not belong to that range. For example the revision range <code>HEAD~3..HEAD</code> consists of 3 commits (<code>HEAD~2</code>, <code>HEAD~1</code>, and <code>HEAD</code>), and the commit <code>HEAD~3</code> serves as a boundary commit for it.</p>
... | <p>A boundary commit is the commit that limits a revision range but does not belong to that range. For example the revision range <code>HEAD~3..HEAD</code> consists of 3 commits (<code>HEAD~2</code>, <code>HEAD~1</code>, and <code>HEAD</code>), and the commit <code>HEAD~3</code> serves as a boundary commit for it.</p> ... | 119 | git | <h1>What is a git boundary commit</h1>
<p>The <a href="https://git-scm.com/docs/git-log" rel="noreferrer"><code>git log</code> command</a> has a <code>--boundary</code> option, which causes the program to</p>
<blockquote>
<p>Output excluded boundary commits.</p>
</blockquote>
<p>But what is a <em>boundary commit</e... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 21,467 | git | # What is a git boundary commit
The [`git log` command](https://git-scm.com/docs/git-log) has a `--boundary` option, which causes the program to
> Output excluded boundary commits.
But what is a *boundary commit*? And when might I want to include them in the output? | A boundary commit is the commit that limits a revision range but does not belong to that range. For example the revision range `HEAD~3..HEAD` consists of 3 commits (`HEAD~2`, `HEAD~1`, and `HEAD`), and the commit `HEAD~3` serves as a boundary commit for it.
More formally, git processes a revision range by starting at ... |
24901929 | Structuring Go subpackages for teams | 27 | 2014-07-23 04:35:00 | <p>We are currently moving some of our codebase to Go and are struggling a bit with a flexible directory structure for multiple devs within a team. Apologies if this is a noob question but I've searched everywhere else and not come up with an answer.</p>
<p>Say I have a package with the following structure:</p>
<pre>... | 28,048 | 660,828 | 2014-07-23 11:51:23 | 24,909,244 | 16 | 2014-07-23 11:27:14 | 884,978 | 2014-07-23 11:51:23 | https://stackoverflow.com/q/24901929 | https://stackoverflow.com/a/24909244 | <h2>Short version:</h2>
<ol>
<li><p>Package should always be go gettable (work with <code>go get package</code>), so 99% of the time, your package will be <code>github.com/user/reponame</code> and you always keep that across your project.</p>
</li>
<li><p>Yes, this should be the central repo and contributor (internal e... | <h2>Short version:</h2> <ol> <li><p>Package should always be go gettable (work with <code>go get package</code>), so 99% of the time, your package will be <code>github.com/user/reponame</code> and you always keep that across your project.</p> </li> <li><p>Yes, this should be the central repo and contributor (internal e... | 119, 758, 15627 | git, go, workflow | <h1>Structuring Go subpackages for teams</h1>
<p>We are currently moving some of our codebase to Go and are struggling a bit with a flexible directory structure for multiple devs within a team. Apologies if this is a noob question but I've searched everywhere else and not come up with an answer.</p>
<p>Say I have a pa... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 21,469 | git | # Structuring Go subpackages for teams
We are currently moving some of our codebase to Go and are struggling a bit with a flexible directory structure for multiple devs within a team. Apologies if this is a noob question but I've searched everywhere else and not come up with an answer.
Say I have a package with the f... | ## Short version:
1. Package should always be go gettable (work with `go get package`), so 99% of the time, your package will be `github.com/user/reponame` and you always keep that across your project.
2. Yes, this should be the central repo and contributor (internal employee or community) should create pull request t... |
757432 | git push/pull times out | 27 | 2009-04-16 18:25:31 | <p>I can't git push/pull to github from my corporate vpn:</p>
<pre><code>git push origin master
ssh: connect to host github.com port 22: Connection timed out
fatal: The remote end hung up unexpectedly
</code></pre>
<p>I assume this is a firewall issue, b/c if I disconnect from the vpn it works. Is there anything I ca... | 52,699 | 13,356 | 2023-10-30 20:05:45 | 757,462 | 16 | 2009-04-16 18:32:35 | 85,134 | 2009-04-16 18:32:35 | https://stackoverflow.com/q/757432 | https://stackoverflow.com/a/757462 | <p>Not sure which type of VPN you're using, but this sort of effect is usually due to the VPN setup routing all your traffic over the VPN. You can work around that by updating your routing tables to route traffic to github back over your Ethernet (I assume) interface rather than over the VPN.</p>
<p>For example <code>... | <p>Not sure which type of VPN you're using, but this sort of effect is usually due to the VPN setup routing all your traffic over the VPN. You can work around that by updating your routing tables to route traffic to github back over your Ethernet (I assume) interface rather than over the VPN.</p> <p>For example <code>... | 119, 2045, 2702 | firewall, git, timeout | <h1>git push/pull times out</h1>
<p>I can't git push/pull to github from my corporate vpn:</p>
<pre><code>git push origin master
ssh: connect to host github.com port 22: Connection timed out
fatal: The remote end hung up unexpectedly
</code></pre>
<p>I assume this is a firewall issue, b/c if I disconnect from the vpn... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 21,470 | git | # git push/pull times out
I can't git push/pull to github from my corporate vpn:
```
git push origin master
ssh: connect to host github.com port 22: Connection timed out
fatal: The remote end hung up unexpectedly
```
I assume this is a firewall issue, b/c if I disconnect from the vpn it works. Is there anything I ca... | Not sure which type of VPN you're using, but this sort of effect is usually due to the VPN setup routing all your traffic over the VPN. You can work around that by updating your routing tables to route traffic to github back over your Ethernet (I assume) interface rather than over the VPN.
For example `route add 65.74... |
26339490 | How is git push through network working? (proxy) | 26 | 2014-10-13 11:59:41 | <p>I'm wondering how <code>git push</code> works. I'm behind a proxy and even configuring it in my PhpStorm soft doesn't work.</p>
<p>So, I'm wondering how it is sent trough network, I guess using the port 80 for HTTP and 443 for HTTPS.</p>
<p>I read a bunch of threads on SO but couldn't figure out what's wrong there.
... | 18,482 | 2,391,795 | 2022-03-17 13:15:53 | 26,352,390 | 16 | 2014-10-14 03:53:45 | 1,142,755 | 2014-10-14 03:53:45 | https://stackoverflow.com/q/26339490 | https://stackoverflow.com/a/26352390 | <p>If your proxy allow access without user and password, then you can use:</p>
<pre><code>git config --global https.proxy https://proxy.company.com:8888
</code></pre>
<p>If your proxy need user & password then:</p>
<pre><code>git config --global https.proxy https://user:password@proxy.company.com:8888
</code></p... | <p>If your proxy allow access without user and password, then you can use:</p> <pre><code>git config --global https.proxy https://proxy.company.com:8888 </code></pre> <p>If your proxy need user & password then:</p> <pre><code>git config --global https.proxy https://user:password@proxy.company.com:8888 </code></p... | 119, 760 | git, proxy | <h1>How is git push through network working? (proxy)</h1>
<p>I'm wondering how <code>git push</code> works. I'm behind a proxy and even configuring it in my PhpStorm soft doesn't work.</p>
<p>So, I'm wondering how it is sent trough network, I guess using the port 80 for HTTP and 443 for HTTPS.</p>
<p>I read a bunch of ... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 21,472 | git | # How is git push through network working? (proxy)
I'm wondering how `git push` works. I'm behind a proxy and even configuring it in my PhpStorm soft doesn't work.
So, I'm wondering how it is sent trough network, I guess using the port 80 for HTTP and 443 for HTTPS.
I read a bunch of threads on SO but couldn't figur... | If your proxy allow access without user and password, then you can use:
```
git config --global https.proxy https://proxy.company.com:8888
```
If your proxy need user & password then:
```
git config --global https.proxy https://user:password@proxy.company.com:8888
```
Be sure to replace `8888` with your real proxy ... |
17339091 | Difference between git pull . master vs git merge master | 26 | 2013-06-27 09:09:32 | <p>Having no remote repository, just one local repository with two branches.</p>
<pre><code>$ git branch -a
master
* devel
</code></pre>
<p>Are following commands <strong>in this context</strong> the same/synonym?</p>
<pre><code>$ git pull . master
</code></pre>
<p>and</p>
<pre><code>$ git merge master
</code></... | 24,342 | 1,057,593 | 2023-06-08 12:53:48 | 17,344,375 | 16 | 2013-06-27 13:22:09 | 19,563 | 2013-06-27 13:22:09 | https://stackoverflow.com/q/17339091 | https://stackoverflow.com/a/17344375 | <p><code>git pull . master</code> fetches from the current repository (a no-op) and will then do something to bring the current branch up to date with <code>master</code>. That something might be a merge but it might also be a rebase depending on the configuration setting <code>pull.rebase</code> or <code>branch.master... | <p><code>git pull . master</code> fetches from the current repository (a no-op) and will then do something to bring the current branch up to date with <code>master</code>. That something might be a merge but it might also be a rebase depending on the configuration setting <code>pull.rebase</code> or <code>branch.master... | 119, 28897 | git, git-merge | <h1>Difference between git pull . master vs git merge master</h1>
<p>Having no remote repository, just one local repository with two branches.</p>
<pre><code>$ git branch -a
master
* devel
</code></pre>
<p>Are following commands <strong>in this context</strong> the same/synonym?</p>
<pre><code>$ git pull . master
... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 21,473 | git | # Difference between git pull . master vs git merge master
Having no remote repository, just one local repository with two branches.
```
$ git branch -a
master
* devel
```
Are following commands **in this context** the same/synonym?
```
$ git pull . master
```
and
```
$ git merge master
```
**UPDATE:**
`$ git... | `git pull . master` fetches from the current repository (a no-op) and will then do something to bring the current branch up to date with `master`. That something might be a merge but it might also be a rebase depending on the configuration setting `pull.rebase` or `branch.master.rebase`.
In the case of a merge, the me... |
2527276 | Git/Mercurial (hg) opinion | 26 | 2010-03-26 22:48:45 | <p>First, let me say I'm not a professional programmer, but an engineer who had a need for it and had to learn. I was always working alone, so it was just me and my seven split personalities ... and we worked okey as a team :) Most of my stuff is done in C/Fortran/Matlab and so far I've been learning git to manage it a... | 4,580 | 302,921 | 2017-06-16 12:38:28 | 2,527,385 | 16 | 2010-03-26 23:13:56 | 2,624,511 | 2017-06-16 12:37:00 | https://stackoverflow.com/q/2527276 | https://stackoverflow.com/a/2527385 | <blockquote>
<p>First, let me say I'm not a professional programmer, but an engineer who had a need for it and had to learn.</p>
</blockquote>
<p>Engineer here, too. I've used Mercurial, Subversion, BitKeeper, and CVS. Haven't made it to Git yet.</p>
<blockquote>
<p>I heard that hg is rather more user friendly ... | <blockquote> <p>First, let me say I'm not a professional programmer, but an engineer who had a need for it and had to learn.</p> </blockquote> <p>Engineer here, too. I've used Mercurial, Subversion, BitKeeper, and CVS. Haven't made it to Git yet.</p> <blockquote> <p>I heard that hg is rather more user friendly ... | 119, 802 | git, mercurial | <h1>Git/Mercurial (hg) opinion</h1>
<p>First, let me say I'm not a professional programmer, but an engineer who had a need for it and had to learn. I was always working alone, so it was just me and my seven split personalities ... and we worked okey as a team :) Most of my stuff is done in C/Fortran/Matlab and so far I... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 21,474 | git | # Git/Mercurial (hg) opinion
First, let me say I'm not a professional programmer, but an engineer who had a need for it and had to learn. I was always working alone, so it was just me and my seven split personalities ... and we worked okey as a team :) Most of my stuff is done in C/Fortran/Matlab and so far I've been ... | > First, let me say I'm not a professional programmer, but an engineer who had a need for it and had to learn.
Engineer here, too. I've used Mercurial, Subversion, BitKeeper, and CVS. Haven't made it to Git yet.
> I heard that hg is rather more user friendly towards windows users, regarding the user interfaces.
Not ... |
13052172 | How can I associate local unversioned code to git remote repository? | 25 | 2012-10-24 15:15:33 | <p>I need to associate a clean unversioned code to an existing git remote repository. </p>
<p>I explain better my situation.
My project is moved from svn to git. I have a svn local working copy with old code (nothing new to commit) that has to be syncronized with the new git repository. I could clone the repo but I s... | 16,356 | 1,771,600 | 2018-04-13 16:36:48 | 13,362,116 | 16 | 2012-11-13 14:03:44 | 1,771,600 | 2012-11-13 14:03:44 | https://stackoverflow.com/q/13052172 | https://stackoverflow.com/a/13362116 | <p>Ok,
I post the right answer for my question based on <a href="https://stackoverflow.com/users/217284/adam-dymitruk">Adam Dymitruk</a> and <a href="https://stackoverflow.com/users/673423/eugene-sajine">Eugene Sajine</a> answers. Thanks everyone for the support :)</p>
<ul>
<li>First of all, remove all <code>.svn</co... | <p>Ok, I post the right answer for my question based on <a href="https://stackoverflow.com/users/217284/adam-dymitruk">Adam Dymitruk</a> and <a href="https://stackoverflow.com/users/673423/eugene-sajine">Eugene Sajine</a> answers. Thanks everyone for the support :)</p> <ul> <li>First of all, remove all <code>.svn</co... | 119, 456, 7330, 41346 | git, git-remote, repository, version-control | <h1>How can I associate local unversioned code to git remote repository?</h1>
<p>I need to associate a clean unversioned code to an existing git remote repository. </p>
<p>I explain better my situation.
My project is moved from svn to git. I have a svn local working copy with old code (nothing new to commit) that has... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 21,476 | git | # How can I associate local unversioned code to git remote repository?
I need to associate a clean unversioned code to an existing git remote repository.
I explain better my situation.
My project is moved from svn to git. I have a svn local working copy with old code (nothing new to commit) that has to be syncronized... | Ok,
I post the right answer for my question based on [Adam Dymitruk](https://stackoverflow.com/users/217284/adam-dymitruk) and [Eugene Sajine](https://stackoverflow.com/users/673423/eugene-sajine) answers. Thanks everyone for the support :)
- First of all, remove all `.svn` directories in working copy directory;
- ini... |
16427600 | How git clone actually works | 24 | 2013-05-07 20:05:19 | <p>I have a repository on Github with 2 branches: <code>master</code> and <code>develop</code>.</p>
<p>When I clone the repository and run <code>$ git branch</code> it shows only the <code>master</code> branch.<br>
If I run <code>$ git branch -a</code> I can see all the remote branches.</p>
<p>Now, if I do a <code>$ ... | 27,849 | 240,324 | 2019-03-15 19:54:19 | 16,427,947 | 16 | 2013-05-07 20:25:29 | 1,275,165 | 2013-05-07 20:31:12 | https://stackoverflow.com/q/16427600 | https://stackoverflow.com/a/16427947 | <p><code>git clone</code> fetches all remote branches, but only creates one local branch, <code>master</code>, for you. So when you run <code>git branch -a</code>, you'll see something like this:</p>
<pre><code>$ git branch -a
* master
remotes/origin/HEAD
remotes/origin/develop
remotes/origin/master
</code></pre... | <p><code>git clone</code> fetches all remote branches, but only creates one local branch, <code>master</code>, for you. So when you run <code>git branch -a</code>, you'll see something like this:</p> <pre><code>$ git branch -a * master remotes/origin/HEAD remotes/origin/develop remotes/origin/master </code></pre... | 119 | git | <h1>How git clone actually works</h1>
<p>I have a repository on Github with 2 branches: <code>master</code> and <code>develop</code>.</p>
<p>When I clone the repository and run <code>$ git branch</code> it shows only the <code>master</code> branch.<br>
If I run <code>$ git branch -a</code> I can see all the remote bra... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 21,477 | git | # How git clone actually works
I have a repository on Github with 2 branches: `master` and `develop`.
When I clone the repository and run `$ git branch` it shows only the `master` branch.
If I run `$ git branch -a` I can see all the remote branches.
Now, if I do a `$ git checkout develop`, I get the message:
> Br... | `git clone` fetches all remote branches, but only creates one local branch, `master`, for you. So when you run `git branch -a`, you'll see something like this:
```
$ git branch -a
* master
remotes/origin/HEAD
remotes/origin/develop
remotes/origin/master
```
which means that you have one local branch `master` an... |
582348 | Using git-svn: Pull, Merge or Rebase? | 24 | 2009-02-24 16:03:50 | <p>I've been fighting the git/git-svn learning curve and last night, as part of that learning curve, I did something very, very bad. I've since gotten it corrected, but I'm hoping to understand the error my ways.</p>
<p>I have an svn repository from which I've cloned the trunk and branches (tags I ignored since we don... | 14,906 | 1,665 | 2010-09-29 01:14:22 | 583,096 | 16 | 2009-02-24 19:00:51 | 23,356 | 2009-02-24 19:00:51 | https://stackoverflow.com/q/582348 | https://stackoverflow.com/a/583096 | <p>The problem you ran into is that the command line syntax for rebase doesn't match your (very reasonable, IMO) expectations. </p>
<pre><code>$ git checkout feature1
$ git rebase trunk
</code></pre>
<p>This sequence adds the unshared feature1 commits onto the HEAD of trunk, and you were expecting that it would plac... | <p>The problem you ran into is that the command line syntax for rebase doesn't match your (very reasonable, IMO) expectations. </p> <pre><code>$ git checkout feature1 $ git rebase trunk </code></pre> <p>This sequence adds the unshared feature1 commits onto the HEAD of trunk, and you were expecting that it would plac... | 119, 717, 6452 | git, git-svn, merge | <h1>Using git-svn: Pull, Merge or Rebase?</h1>
<p>I've been fighting the git/git-svn learning curve and last night, as part of that learning curve, I did something very, very bad. I've since gotten it corrected, but I'm hoping to understand the error my ways.</p>
<p>I have an svn repository from which I've cloned the ... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 21,480 | git | # Using git-svn: Pull, Merge or Rebase?
I've been fighting the git/git-svn learning curve and last night, as part of that learning curve, I did something very, very bad. I've since gotten it corrected, but I'm hoping to understand the error my ways.
I have an svn repository from which I've cloned the trunk and branch... | The problem you ran into is that the command line syntax for rebase doesn't match your (very reasonable, IMO) expectations.
```
$ git checkout feature1
$ git rebase trunk
```
This sequence adds the unshared feature1 commits onto the HEAD of trunk, and you were expecting that it would place the new trunk commits onto ... |
49626717 | What is the difference between interactive rebase and normal rebase? | 23 | 2018-04-03 09:33:22 | <p>What is the different between interactive rebase, like: </p>
<pre><code>git rebase -i HEAD~3
</code></pre>
<p>And rebase without <code>-i</code>:</p>
<pre><code>git rebase HEAD~3
</code></pre>
| 18,905 | 8,323,793 | 2020-05-16 11:58:00 | 49,627,889 | 16 | 2018-04-03 10:33:13 | 894,836 | 2018-04-03 10:33:13 | https://stackoverflow.com/q/49626717 | https://stackoverflow.com/a/49627889 | <p>As Thomas Edwards commented, the docs are helpful here. As is the <a href="https://git-scm.com/book/en/v2" rel="noreferrer">pro git book</a> (specifically the sections on <a href="https://git-scm.com/book/en/v2/Git-Branching-Rebasing" rel="noreferrer">rebasing</a> and <a href="https://git-scm.com/book/en/v2/Git-Tool... | <p>As Thomas Edwards commented, the docs are helpful here. As is the <a href="https://git-scm.com/book/en/v2" rel="noreferrer">pro git book</a> (specifically the sections on <a href="https://git-scm.com/book/en/v2/Git-Branching-Rebasing" rel="noreferrer">rebasing</a> and <a href="https://git-scm.com/book/en/v2/Git-Tool... | 119, 29934 | git, git-rebase | <h1>What is the difference between interactive rebase and normal rebase?</h1>
<p>What is the different between interactive rebase, like: </p>
<pre><code>git rebase -i HEAD~3
</code></pre>
<p>And rebase without <code>-i</code>:</p>
<pre><code>git rebase HEAD~3
</code></pre>
| q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 21,481 | git | # What is the difference between interactive rebase and normal rebase?
What is the different between interactive rebase, like:
```
git rebase -i HEAD~3
```
And rebase without `-i`:
```
git rebase HEAD~3
``` | As Thomas Edwards commented, the docs are helpful here. As is the [pro git book](https://git-scm.com/book/en/v2) (specifically the sections on [rebasing](https://git-scm.com/book/en/v2/Git-Branching-Rebasing) and [rewriting history](https://git-scm.com/book/en/v2/Git-Tools-Rewriting-History).
At it's core, a rebase wi... |
14784229 | git: push only specific tags | 23 | 2013-02-09 02:09:35 | <p>AFAIK, <code>git push --tag</code> pushes every tags under refs/tags to remote. I want to know if there is a way in git to only push some tags that matches a wildcard or regexp?</p>
<p>For example, my repo has tag <code>v1.0</code>, <code>v1.1</code>, <code>v2.0</code> and <code>v2.1</code>. I want to only push <co... | 11,216 | 153,133 | 2020-03-22 16:44:54 | 14,784,546 | 16 | 2013-02-09 03:13:10 | 1,854,924 | 2013-02-09 03:13:10 | https://stackoverflow.com/q/14784229 | https://stackoverflow.com/a/14784546 | <pre><code>git tag | grep '^v2\.' | xargs --no-run-if-empty git push <repo>
</code></pre>
<ul>
<li><code>.git</code> may not be directory, it may not be there at all. Submodules have there file pointing to root repository. Or you can have <code>GIT_DIR</code> set to somewhere else.</li>
<li>When no tags match y... | <pre><code>git tag | grep '^v2\.' | xargs --no-run-if-empty git push <repo> </code></pre> <ul> <li><code>.git</code> may not be directory, it may not be there at all. Submodules have there file pointing to root repository. Or you can have <code>GIT_DIR</code> set to somewhere else.</li> <li>When no tags match y... | 115, 119 | git, tags | <h1>git: push only specific tags</h1>
<p>AFAIK, <code>git push --tag</code> pushes every tags under refs/tags to remote. I want to know if there is a way in git to only push some tags that matches a wildcard or regexp?</p>
<p>For example, my repo has tag <code>v1.0</code>, <code>v1.1</code>, <code>v2.0</code> and <cod... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 21,485 | git | # git: push only specific tags
AFAIK, `git push --tag` pushes every tags under refs/tags to remote. I want to know if there is a way in git to only push some tags that matches a wildcard or regexp?
For example, my repo has tag `v1.0`, `v1.1`, `v2.0` and `v2.1`. I want to only push `v2.*`. I tried
```
git push <repo>... | ```
git tag | grep '^v2\.' | xargs --no-run-if-empty git push <repo>
```
- `.git` may not be directory, it may not be there at all. Submodules have there file pointing to root repository. Or you can have `GIT_DIR` set to somewhere else.
- When no tags match your criteria, you do not want to do the push. |
7430093 | A git log history graph with one line per commit, in color, with dates | 23 | 2011-09-15 11:33:03 | <p>I need to have format like:</p>
<pre><code>git log --decorate --graph --oneline --date-order
</code></pre>
<p>but I need it also:</p>
<ol>
<li>to contain date (short)</li>
<li>to have the same colors</li>
</ol>
<p>I tried:</p>
<pre><code>git log --decorate --graph --oneline --date-order \
--date=short --pretty=... | 17,718 | 676,439 | 2021-11-27 01:54:35 | 7,430,132 | 16 | 2011-09-15 11:36:50 | 6,309 | 2011-09-15 11:36:50 | https://stackoverflow.com/q/7430093 | https://stackoverflow.com/a/7430132 | <p>You can try:</p>
<pre><code>alias.lgb=log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=short --branches
</code></pre>
<p>It has different color, but you can change them easily.</p>
<p>for instance:</p>
<pre><code>git log --gr... | <p>You can try:</p> <pre><code>alias.lgb=log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=short --branches </code></pre> <p>It has different color, but you can change them easily.</p> <p>for instance:</p> <pre><code>git log --gr... | 119, 47913 | git, git-log | <h1>A git log history graph with one line per commit, in color, with dates</h1>
<p>I need to have format like:</p>
<pre><code>git log --decorate --graph --oneline --date-order
</code></pre>
<p>but I need it also:</p>
<ol>
<li>to contain date (short)</li>
<li>to have the same colors</li>
</ol>
<p>I tried:</p>
<pre>... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 21,486 | git | # A git log history graph with one line per commit, in color, with dates
I need to have format like:
```
git log --decorate --graph --oneline --date-order
```
but I need it also:
1. to contain date (short)
2. to have the same colors
I tried:
```
git log --decorate --graph --oneline --date-order \
--date=short --p... | You can try:
```
alias.lgb=log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=short --branches
```
It has different color, but you can change them easily.
for instance:
```
git log --graph --pretty=format:'%Cred%h -%d %s (%cr) <%an>%Cre... |
44470093 | Handle git branching for test and production | 22 | 2017-06-10 05:58:56 | <p>When working with git (flow) and having a stage/test environment where the customer are doing their reviews of the things developed what is the best way of handling features that aren't approved along with features that are? </p>
<p>Consider the scenario that several developers working with different features in a ... | 12,384 | 1,381,710 | 2022-03-15 16:44:05 | 44,470,240 | 16 | 2017-06-10 06:19:35 | 6,309 | 2022-03-15 16:44:05 | https://stackoverflow.com/q/44470093 | https://stackoverflow.com/a/44470240 | <p>That issue (dev branch polluted by "non-approved but already integrated" feature branches) is <em>exactly</em> what describe <strong><a href="https://twitter.com/rocketraman" rel="noreferrer">Raman Gupta</a></strong> in "<a href="https://medium.com/hackernoon/how-the-creators-of-git-do-branches-e6fcc5... | <p>That issue (dev branch polluted by "non-approved but already integrated" feature branches) is <em>exactly</em> what describe <strong><a href="https://twitter.com/rocketraman" rel="noreferrer">Raman Gupta</a></strong> in "<a href="https://medium.com/hackernoon/how-the-creators-of-git-do-branches-e6fcc5... | 119, 64339 | git, git-flow | <h1>Handle git branching for test and production</h1>
<p>When working with git (flow) and having a stage/test environment where the customer are doing their reviews of the things developed what is the best way of handling features that aren't approved along with features that are? </p>
<p>Consider the scenario that se... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 21,488 | git | # Handle git branching for test and production
When working with git (flow) and having a stage/test environment where the customer are doing their reviews of the things developed what is the best way of handling features that aren't approved along with features that are?
Consider the scenario that several developers ... | That issue (dev branch polluted by "non-approved but already integrated" feature branches) is *exactly* what describe **[Raman Gupta](https://twitter.com/rocketraman)** in "[**How the Creators of Git Do Branching**](https://medium.com/hackernoon/how-the-creators-of-git-do-branches-e6fcc57270fb)".
(GitHub repo for thi... |
38725102 | How to add custom git command to zsh completion? | 21 | 2016-08-02 15:47:09 | <p>I've read a few guides on zsh completion, but I am still confused. In our development environment we have a custom Git command called <code>git new-branch</code>. I'd like zsh to auto-complete it for me after typing just <code>git ne</code> and a <kbd>Tab</kbd>. How can I do that?</p>
| 4,235 | 178,315 | 2024-07-07 12:49:58 | 38,850,556 | 16 | 2016-08-09 12:18:58 | 1,881,610 | 2024-07-07 12:49:58 | https://stackoverflow.com/q/38725102 | https://stackoverflow.com/a/38850556 | <p>There are two different <code>_git</code> completion files distributed - <a href="https://github.com/zsh-users/zsh/blob/zsh-5.9/Completion/Unix/Command/_git" rel="nofollow noreferrer">one by written and maintained directly by ZSH</a>, and another <a href="https://github.com/git/git/blob/master/contrib/completion/git... | <p>There are two different <code>_git</code> completion files distributed - <a href="https://github.com/zsh-users/zsh/blob/zsh-5.9/Completion/Unix/Command/_git" rel="nofollow noreferrer">one by written and maintained directly by ZSH</a>, and another <a href="https://github.com/git/git/blob/master/contrib/completion/git... | 119, 71799 | git, zsh-completion | <h1>How to add custom git command to zsh completion?</h1>
<p>I've read a few guides on zsh completion, but I am still confused. In our development environment we have a custom Git command called <code>git new-branch</code>. I'd like zsh to auto-complete it for me after typing just <code>git ne</code> and a <kbd>Tab</kb... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 21,492 | git | # How to add custom git command to zsh completion?
I've read a few guides on zsh completion, but I am still confused. In our development environment we have a custom Git command called `git new-branch`. I'd like zsh to auto-complete it for me after typing just `git ne` and a `Tab`. How can I do that? | There are two different `_git` completion files distributed - [one by written and maintained directly by ZSH](https://github.com/zsh-users/zsh/blob/zsh-5.9/Completion/Unix/Command/_git), and another [written by Git contributors](https://github.com/git/git/blob/master/contrib/completion/git-completion.zsh).
Using `_whe... |
27134100 | Whats the Proper usage of .gitattributes with merge=ours | 21 | 2014-11-25 18:30:31 | <p>I just tried using .gitattributes for the first time. I figure I must be doing something wrong because it is not working as I thought the purpose of using the <code>merge=ours</code> attribute was intended for (?).</p>
<p>An example of my usage:</p>
<p>I have two branches; one is the "master" and the other is "GC... | 23,073 | null | 2014-12-03 19:31:44 | 27,280,094 | 16 | 2014-12-03 19:31:44 | null | 2014-12-03 19:31:44 | https://stackoverflow.com/q/27134100 | https://stackoverflow.com/a/27280094 | <p>Easy fix once I knew what I was doing: I missed adding the merge strategy with <code>git config --global merge.ours.driver true</code> in my local environment. </p>
| <p>Easy fix once I knew what I was doing: I missed adding the merge strategy with <code>git config --global merge.ours.driver true</code> in my local environment. </p> | 119, 717, 1467, 8337 | attributes, bitbucket, git, merge | <h1>Whats the Proper usage of .gitattributes with merge=ours</h1>
<p>I just tried using .gitattributes for the first time. I figure I must be doing something wrong because it is not working as I thought the purpose of using the <code>merge=ours</code> attribute was intended for (?).</p>
<p>An example of my usage:</p>... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 21,494 | git | # Whats the Proper usage of .gitattributes with merge=ours
I just tried using .gitattributes for the first time. I figure I must be doing something wrong because it is not working as I thought the purpose of using the `merge=ours` attribute was intended for (?).
An example of my usage:
I have two branches; one is th... | Easy fix once I knew what I was doing: I missed adding the merge strategy with `git config --global merge.ours.driver true` in my local environment. |
17151597 | Which code is shared between the original Git and libgit2? | 21 | 2013-06-17 15:45:06 | <p>Which code and how much code do the original <a href="https://github.com/git/git" rel="noreferrer">Git codebase</a> and <a href="https://libgit2.github.com/" rel="noreferrer">libgit2</a> have in common (from nothing to all Git functionality except of command line client entry points)? </p>
<p>I'm primarily interest... | 4,305 | 241,453 | 2017-02-16 06:14:24 | 17,152,204 | 16 | 2013-06-17 16:18:17 | 720,999 | 2017-02-16 06:14:24 | https://stackoverflow.com/q/17151597 | https://stackoverflow.com/a/17152204 | <p>I believe currently they share no code. You might be interested in <a href="http://public-inbox.org/git/1267957655.3759.29.camel@mattotaupa/T/" rel="nofollow noreferrer">this thread on the main Git list</a>¹ regarding a prospective "reimplementing" Git on top of <code>libgit2</code> — with main Git maintainer ... | <p>I believe currently they share no code. You might be interested in <a href="http://public-inbox.org/git/1267957655.3759.29.camel@mattotaupa/T/" rel="nofollow noreferrer">this thread on the main Git list</a>¹ regarding a prospective "reimplementing" Git on top of <code>libgit2</code> — with main Git maintainer ... | 119, 66800 | git, libgit2 | <h1>Which code is shared between the original Git and libgit2?</h1>
<p>Which code and how much code do the original <a href="https://github.com/git/git" rel="noreferrer">Git codebase</a> and <a href="https://libgit2.github.com/" rel="noreferrer">libgit2</a> have in common (from nothing to all Git functionality except o... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 21,495 | git | # Which code is shared between the original Git and libgit2?
Which code and how much code do the original [Git codebase](https://github.com/git/git) and [libgit2](https://libgit2.github.com/) have in common (from nothing to all Git functionality except of command line client entry points)?
I'm primarily interested in... | I believe currently they share no code. You might be interested in [this thread on the main Git list](http://public-inbox.org/git/1267957655.3759.29.camel@mattotaupa/T/)¹ regarding a prospective "reimplementing" Git on top of `libgit2` — with main Git maintainer (Junio C Hamano) chiming in.
In general, you might find ... |
13141871 | SVN to Git Branch/Tag/Trunk | 21 | 2012-10-30 15:05:51 | <p>I am making the leap from SVN to Git (though, my respect for SVN will still hold) and I had a few questions for some SVN to Git terminology. In SVN, many repositories are setup like this:</p>
<pre><code>- trunk : The place where all of the main development occurs
- tag : Storing versions of major releases or im... | 17,872 | 663,604 | 2017-04-26 20:50:14 | 13,142,086 | 16 | 2012-10-30 15:17:13 | 1,713,859 | 2012-10-30 15:17:13 | https://stackoverflow.com/q/13141871 | https://stackoverflow.com/a/13142086 | <p>Git does not force you to use a specific structure for your project.
All information which is important for git itself will be stored
in the hidden .git directory.
To list or see you branches and tags use the git commands:</p>
<pre><code>git branch
git tag
...
</code></pre>
<p>to get further information use the ... | <p>Git does not force you to use a specific structure for your project. All information which is important for git itself will be stored in the hidden .git directory. To list or see you branches and tags use the git commands:</p> <pre><code>git branch git tag ... </code></pre> <p>to get further information use the ... | 63, 115, 119, 1879, 1880 | branch, git, svn, tags, trunk | <h1>SVN to Git Branch/Tag/Trunk</h1>
<p>I am making the leap from SVN to Git (though, my respect for SVN will still hold) and I had a few questions for some SVN to Git terminology. In SVN, many repositories are setup like this:</p>
<pre><code>- trunk : The place where all of the main development occurs
- tag : Sto... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 21,496 | git | # SVN to Git Branch/Tag/Trunk
I am making the leap from SVN to Git (though, my respect for SVN will still hold) and I had a few questions for some SVN to Git terminology. In SVN, many repositories are setup like this:
```
- trunk : The place where all of the main development occurs
- tag : Storing versions of maj... | Git does not force you to use a specific structure for your project.
All information which is important for git itself will be stored
in the hidden .git directory.
To list or see you branches and tags use the git commands:
```
git branch
git tag
...
```
to get further information use the `git help` command or have a... |
6136789 | Cloning Android sources to a local repository server | 21 | 2011-05-26 10:00:34 | <p>I want to develop on top of Android using a local Android repository server. I need to add several new git repositories to the hierarchy of gits, and I need to modify existing android sources for a custom tailoring of Android.</p>
<p><strong>What is the "correct" way to clone the entire Android source tree of git r... | 10,303 | 81,398 | 2012-07-20 04:23:00 | 11,572,576 | 16 | 2012-07-20 03:44:32 | 834,644 | 2012-07-20 04:23:00 | https://stackoverflow.com/q/6136789 | https://stackoverflow.com/a/11572576 | <p>On your git server</p>
<ol>
<li>repo init -u <a href="https://android.googlesource.com/platform/manifest" rel="noreferrer">https://android.googlesource.com/platform/manifest</a> --mirror <strong><em># --mirror is the key</em></strong></li>
<li>repo sync</li>
</ol>
<p>Because you specified --mirror, all repos creat... | <p>On your git server</p> <ol> <li>repo init -u <a href="https://android.googlesource.com/platform/manifest" rel="noreferrer">https://android.googlesource.com/platform/manifest</a> --mirror <strong><em># --mirror is the key</em></strong></li> <li>repo sync</li> </ol> <p>Because you specified --mirror, all repos creat... | 119, 1386, 7330, 43193 | android, android-manifest, git, repository | <h1>Cloning Android sources to a local repository server</h1>
<p>I want to develop on top of Android using a local Android repository server. I need to add several new git repositories to the hierarchy of gits, and I need to modify existing android sources for a custom tailoring of Android.</p>
<p><strong>What is the ... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 21,497 | git | # Cloning Android sources to a local repository server
I want to develop on top of Android using a local Android repository server. I need to add several new git repositories to the hierarchy of gits, and I need to modify existing android sources for a custom tailoring of Android.
**What is the "correct" way to clone... | On your git server
1. repo init -u <https://android.googlesource.com/platform/manifest> --mirror ***# --mirror is the key***
2. repo sync
Because you specified --mirror, all repos created will be 'bare' repos, which is the git-correct way to create a mirror unless you are a git uberlord.
On your client:
1. repo ini... |
3985463 | Prevent pushes to git containing tabs in certain files (e.g. *.cpp, *.h, CMakeLists.txt) | 21 | 2010-10-21 08:14:01 | <p>I'd like my remote repository to refuse any pushes that contains a file that contains a tab, but only if the file belongs in a certain class (based on the filename). Is that possible?<br>
I have looked a bit at the <code>update hook</code> in githooks, and I think that is the correct one. </p>
<p>So in short, a pus... | 7,183 | 180,180 | 2017-08-30 19:30:49 | 4,145,628 | 16 | 2010-11-10 14:44:20 | 119,963 | 2017-04-04 02:37:00 | https://stackoverflow.com/q/3985463 | https://stackoverflow.com/a/4145628 | <p>Uh oh, this question seems to have slipped through the cracks. Hope you're still out there, Esben!</p>
<p>You're looking for an <a href="https://git-scm.com/docs/githooks" rel="nofollow noreferrer">update hook</a>, which is run once for each ref updated. The arguments are the name of the ref, the old object name (c... | <p>Uh oh, this question seems to have slipped through the cracks. Hope you're still out there, Esben!</p> <p>You're looking for an <a href="https://git-scm.com/docs/githooks" rel="nofollow noreferrer">update hook</a>, which is run once for each ref updated. The arguments are the name of the ref, the old object name (c... | 119, 43087 | git, githooks | <h1>Prevent pushes to git containing tabs in certain files (e.g. *.cpp, *.h, CMakeLists.txt)</h1>
<p>I'd like my remote repository to refuse any pushes that contains a file that contains a tab, but only if the file belongs in a certain class (based on the filename). Is that possible?<br>
I have looked a bit at the <cod... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 21,498 | git | # Prevent pushes to git containing tabs in certain files (e.g. *.cpp, *.h, CMakeLists.txt)
I'd like my remote repository to refuse any pushes that contains a file that contains a tab, but only if the file belongs in a certain class (based on the filename). Is that possible?
I have looked a bit at the `update hook` i... | Uh oh, this question seems to have slipped through the cracks. Hope you're still out there, Esben!
You're looking for an [update hook](https://git-scm.com/docs/githooks), which is run once for each ref updated. The arguments are the name of the ref, the old object name (commit SHA1), and the new object name.
So, all ... |
71891061 | Git has stopped working after installing VS 2022 | 20 | 2022-04-16 04:19:34 | <p>After installing the new Visual Studio 2022 the built-in Git support has suddenly stopped working. For one of the projects I am seeing only a submodule instead of the main repository. For another project the built-in Git panel doesn't appear at all, displaying some cryptic message about "SccProviderPackage"... | 11,496 | 306,470 | 2022-09-28 14:17:44 | 71,891,062 | 16 | 2022-04-16 04:19:34 | 306,470 | 2022-04-16 04:19:34 | https://stackoverflow.com/q/71891061 | https://stackoverflow.com/a/71891062 | <p>In the end I had decided to give up and try Git Extensions from GitHub instead. There I finally see the exact error message (for some reason, it was in the "Remotes" list instead of the actual list of remotes, but at least it was there).</p>
<p>The cause was that Git didn't consider directories with my rep... | <p>In the end I had decided to give up and try Git Extensions from GitHub instead. There I finally see the exact error message (for some reason, it was in the "Remotes" list instead of the actual list of remotes, but at least it was there).</p> <p>The cause was that Git didn't consider directories with my rep... | 119, 151504 | git, visual-studio-2022 | <h1>Git has stopped working after installing VS 2022</h1>
<p>After installing the new Visual Studio 2022 the built-in Git support has suddenly stopped working. For one of the projects I am seeing only a submodule instead of the main repository. For another project the built-in Git panel doesn't appear at all, displayin... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 21,500 | git | # Git has stopped working after installing VS 2022
After installing the new Visual Studio 2022 the built-in Git support has suddenly stopped working. For one of the projects I am seeing only a submodule instead of the main repository. For another project the built-in Git panel doesn't appear at all, displaying some cr... | In the end I had decided to give up and try Git Extensions from GitHub instead. There I finally see the exact error message (for some reason, it was in the "Remotes" list instead of the actual list of remotes, but at least it was there).
The cause was that Git didn't consider directories with my repos "safe". So the s... |
55017670 | git checkout & git pull : Avoid intermediate file changes when executing | 20 | 2019-03-06 07:23:02 | <p>I'm surprised I couldn't find anything about that...</p>
<p>In short, my question is if is there a way to avoid the intermediate file changes between the following two commands, if after the following two commands the file content is exactly as was before?</p>
<pre><code>git checkout dev
git pull
</code></pre>
<p... | 22,144 | 2,463,642 | 2024-08-29 19:44:35 | 64,205,473 | 16 | 2020-10-05 08:57:41 | 1,815,446 | 2024-08-29 19:44:35 | https://stackoverflow.com/q/55017670 | https://stackoverflow.com/a/64205473 | <pre><code>git fetch origin master:master
</code></pre>
<p>Replace <code>master</code> with the branch you want to update. <em>(In the OP's scenario, it will be <code>git fetch origin dev:dev</code>)</em></p>
<p>This command only works for a fast-forward merge.</p>
<p>Once the local branch is updated with the remote ch... | <pre><code>git fetch origin master:master </code></pre> <p>Replace <code>master</code> with the branch you want to update. <em>(In the OP's scenario, it will be <code>git fetch origin dev:dev</code>)</em></p> <p>This command only works for a fast-forward merge.</p> <p>Once the local branch is updated with the remote ch... | 119, 1879, 4860, 5281, 5310 | branch, checkout, file, git, pull | <h1>git checkout & git pull : Avoid intermediate file changes when executing</h1>
<p>I'm surprised I couldn't find anything about that...</p>
<p>In short, my question is if is there a way to avoid the intermediate file changes between the following two commands, if after the following two commands the file content is ... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 21,501 | git | # git checkout & git pull : Avoid intermediate file changes when executing
I'm surprised I couldn't find anything about that...
In short, my question is if is there a way to avoid the intermediate file changes between the following two commands, if after the following two commands the file content is exactly as was b... | ```
git fetch origin master:master
```
Replace `master` with the branch you want to update. *(In the OP's scenario, it will be `git fetch origin dev:dev`)*
This command only works for a fast-forward merge.
Once the local branch is updated with the remote changes you can switch to the desired branch without causing f... |
47988748 | Show diff when writing commit messages during an interactive rebase | 20 | 2017-12-27 08:24:52 | <p>When doing a regular git commit, <code>git commit --verbose</code> shows the diff in the text editor when writing the commit message.</p>
<p>Suppose I am doing an interactive rebase (<code>git rebase --interactive</code>) to edit previous commits. To 'continue' rebasing, I run <code>git rebase --continue</code>. Th... | 2,446 | 5,916,915 | 2020-05-14 05:36:54 | 52,757,123 | 16 | 2018-10-11 09:50:55 | 5,916,915 | 2020-05-14 05:36:54 | https://stackoverflow.com/q/47988748 | https://stackoverflow.com/a/52757123 | <p>To show the diff:</p>
<pre><code>git -c commit.verbose=true rebase --continue
</code></pre>
<p>To make all commits verbose without having to specify <code>-c commit.verbose=true</code> every time, add this to <code>~/.gitconfig</code>:</p>
<pre><code>[commit]
verbose = true
</code></pre>
<p>Reference: <a hre... | <p>To show the diff:</p> <pre><code>git -c commit.verbose=true rebase --continue </code></pre> <p>To make all commits verbose without having to specify <code>-c commit.verbose=true</code> every time, add this to <code>~/.gitconfig</code>:</p> <pre><code>[commit] verbose = true </code></pre> <p>Reference: <a hre... | 119, 29934, 53850 | git, git-commit, git-rebase | <h1>Show diff when writing commit messages during an interactive rebase</h1>
<p>When doing a regular git commit, <code>git commit --verbose</code> shows the diff in the text editor when writing the commit message.</p>
<p>Suppose I am doing an interactive rebase (<code>git rebase --interactive</code>) to edit previous ... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 21,503 | git | # Show diff when writing commit messages during an interactive rebase
When doing a regular git commit, `git commit --verbose` shows the diff in the text editor when writing the commit message.
Suppose I am doing an interactive rebase (`git rebase --interactive`) to edit previous commits. To 'continue' rebasing, I run... | To show the diff:
```
git -c commit.verbose=true rebase --continue
```
To make all commits verbose without having to specify `-c commit.verbose=true` every time, add this to `~/.gitconfig`:
```
[commit]
verbose = true
```
Reference: [`man git-config`](https://git-scm.com/docs/git-config#Documentation/git-config... |
35597754 | Make npm fetch latest package from Git repo | 20 | 2016-02-24 09:11:19 | <p>My question is similar to <a href="https://stackoverflow.com/questions/33008102/npm-package-from-private-github-repo-install-vs-update-package-json">this one</a>.</p>
<p>A project has a dependency on a Git module which resides in a privately-hosted repository:</p>
<pre><code>"dependencies": {
"mymod": "git+https... | 18,661 | 2,648,205 | 2022-10-03 12:45:18 | 52,458,146 | 16 | 2018-09-22 15:30:16 | 8,727,608 | 2021-01-27 12:20:26 | https://stackoverflow.com/q/35597754 | https://stackoverflow.com/a/52458146 | <p><strong>UPDATE - 2021 - private package in development and production</strong></p>
<p>In my new project I tried my best to write my code to fit both production and development with a minimum changes, working with my private package was one of the challenges.</p>
<p>I wanted to work locally on my package so all chang... | <p><strong>UPDATE - 2021 - private package in development and production</strong></p> <p>In my new project I tried my best to write my code to fit both production and development with a minimum changes, working with my private package was one of the challenges.</p> <p>I wanted to work locally on my package so all chang... | 119, 46426, 61387 | git, node.js, npm | <h1>Make npm fetch latest package from Git repo</h1>
<p>My question is similar to <a href="https://stackoverflow.com/questions/33008102/npm-package-from-private-github-repo-install-vs-update-package-json">this one</a>.</p>
<p>A project has a dependency on a Git module which resides in a privately-hosted repository:</p... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 21,504 | git | # Make npm fetch latest package from Git repo
My question is similar to [this one](https://stackoverflow.com/questions/33008102/npm-package-from-private-github-repo-install-vs-update-package-json).
A project has a dependency on a Git module which resides in a privately-hosted repository:
```
"dependencies": {
"mym... | **UPDATE - 2021 - private package in development and production**
In my new project I tried my best to write my code to fit both production and development with a minimum changes, working with my private package was one of the challenges.
I wanted to work locally on my package so all changes would be applied right aw... |
2658753 | Git: Stage into Commit, what is the right workflow? | 20 | 2010-04-17 14:53:09 | <p>I just created a big piece of code I want to commit in several separate commits.<br>
So I can stage relevant parts, commit, stage, commit, ... and so on until I have all my changes commited.</p>
<p>The missing part is how can I test whether I split the commit correcty.<br>
I.e. whether the part that is in staging a... | 22,150 | 61,342 | 2011-10-07 13:18:02 | 2,658,866 | 16 | 2010-04-17 15:22:50 | 6,309 | 2011-07-09 01:58:02 | https://stackoverflow.com/q/2658753 | https://stackoverflow.com/a/2658866 | <p>You could do it with:</p>
<pre><code>$ git branch task1 # first set of commit to do
</code></pre>
<p>An intermediate branch can be useful to record some intermediate commits when you are slowly adding some content to the index.</p>
<p>Then try an <a href="http://book.git-scm.com/4_interactive_adding.html" rel="no... | <p>You could do it with:</p> <pre><code>$ git branch task1 # first set of commit to do </code></pre> <p>An intermediate branch can be useful to record some intermediate commits when you are slowly adding some content to the index.</p> <p>Then try an <a href="http://book.git-scm.com/4_interactive_adding.html" rel="no... | 119, 2193, 5597, 20002 | commit, git, split, staging | <h1>Git: Stage into Commit, what is the right workflow?</h1>
<p>I just created a big piece of code I want to commit in several separate commits.<br>
So I can stage relevant parts, commit, stage, commit, ... and so on until I have all my changes commited.</p>
<p>The missing part is how can I test whether I split the co... | q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10 | 21,507 | git | # Git: Stage into Commit, what is the right workflow?
I just created a big piece of code I want to commit in several separate commits.
So I can stage relevant parts, commit, stage, commit, ... and so on until I have all my changes commited.
The missing part is how can I test whether I split the commit correcty.
I... | You could do it with:
```
$ git branch task1 # first set of commit to do
```
An intermediate branch can be useful to record some intermediate commits when you are slowly adding some content to the index.
Then try an [interactive session for adding](http://book.git-scm.com/4_interactive_adding.html) just what you wan... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.