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
1808557
What is the easiest/fastest way to find out when a git branch was created?
8
2009-11-27 12:43:19
<p>I was trying to find out when a certain feature branch in one of my repositories was created and I found that surprisingly hard. I ended up using a combination of <code>git show-branch</code> and <code>git log</code>. </p> <p>Is there any easier way to find this little piece of information quickly and efficiently f...
7,561
7,498
2009-11-27 12:53:23
1,808,605
14
2009-11-27 12:53:23
112,968
2009-11-27 12:53:23
https://stackoverflow.com/q/1808557
https://stackoverflow.com/a/1808605
<pre><code>git show $(git merge-base master your-branch) </code></pre> <p>will show the commit where your branch branched off master</p>
<pre><code>git show $(git merge-base master your-branch) </code></pre> <p>will show the commit where your branch branched off master</p>
119, 1879
branch, git
<h1>What is the easiest/fastest way to find out when a git branch was created?</h1> <p>I was trying to find out when a certain feature branch in one of my repositories was created and I found that surprisingly hard. I ended up using a combination of <code>git show-branch</code> and <code>git log</code>. </p> <p>Is the...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
22,417
git
# What is the easiest/fastest way to find out when a git branch was created? I was trying to find out when a certain feature branch in one of my repositories was created and I found that surprisingly hard. I ended up using a combination of `git show-branch` and `git log`. Is there any easier way to find this little p...
``` git show $(git merge-base master your-branch) ``` will show the commit where your branch branched off master
1545118
GIT: Appending a patch made after a few commits
8
2009-10-09 17:33:05
<p>I use git to keep track of changes made by our development team and committed into our central cvs-style repository. Since its cvs, it keeps track of files and not commits, making it sometimes difficult to tell exactly what files constitute the full patch for a bug fix. I just came across one and did the following...
2,973
36,228
2009-10-09 19:12:57
1,545,216
14
2009-10-09 17:57:46
119,963
2009-10-09 17:57:46
https://stackoverflow.com/q/1545118
https://stackoverflow.com/a/1545216
<h2>What happened</h2> <p>You mean amend, not append, right? I'm going to pretend this was on a branch called master, for convenience. This is what your repository looks like now:</p> <pre><code>A---B' (master) \ \-B---C---D </code></pre> <p>Git commits explicitly depend on their parents - the same patch on top ...
<h2>What happened</h2> <p>You mean amend, not append, right? I'm going to pretend this was on a branch called master, for convenience. This is what your repository looks like now:</p> <pre><code>A---B' (master) \ \-B---C---D </code></pre> <p>Git commits explicitly depend on their parents - the same patch on top ...
119, 456, 3346
dvcs, git, version-control
<h1>GIT: Appending a patch made after a few commits</h1> <p>I use git to keep track of changes made by our development team and committed into our central cvs-style repository. Since its cvs, it keeps track of files and not commits, making it sometimes difficult to tell exactly what files constitute the full patch for...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
22,418
git
# GIT: Appending a patch made after a few commits I use git to keep track of changes made by our development team and committed into our central cvs-style repository. Since its cvs, it keeps track of files and not commits, making it sometimes difficult to tell exactly what files constitute the full patch for a bug fix...
## What happened You mean amend, not append, right? I'm going to pretend this was on a branch called master, for convenience. This is what your repository looks like now: ``` A---B' (master) \ \-B---C---D ``` Git commits explicitly depend on their parents - the same patch on top of a different parent is a differe...
67089993
Git flow question, merging to master and develop
7
2021-04-14 10:30:51
<p>I am currently using git flow with sourcetree. Work is agreed for the sprint and I create branches off develop to commit code into. I merge the feature branches into develop, then at the end of sprint I merge to master and code goes into production.</p> <p>This works fine, however, if a fix needs pushing to master o...
12,559
1,901,521
2021-04-14 15:18:54
67,094,483
14
2021-04-14 15:18:54
184,546
2021-04-14 15:18:54
https://stackoverflow.com/q/67089993
https://stackoverflow.com/a/67094483
<blockquote> <p>I merge the feature branches into develop, then at the end of sprint I merge to master and code goes into production.</p> </blockquote> <p>You can certainly do that if you wish, but typically in Git Flow you don't merge <code>develop</code> <em>directly</em> into <code>master</code> because of the exact...
<blockquote> <p>I merge the feature branches into develop, then at the end of sprint I merge to master and code goes into production.</p> </blockquote> <p>You can certainly do that if you wish, but typically in Git Flow you don't merge <code>develop</code> <em>directly</em> into <code>master</code> because of the exact...
119, 64339, 90056
atlassian-sourcetree, git, git-flow
<h1>Git flow question, merging to master and develop</h1> <p>I am currently using git flow with sourcetree. Work is agreed for the sprint and I create branches off develop to commit code into. I merge the feature branches into develop, then at the end of sprint I merge to master and code goes into production.</p> <p>Th...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
22,420
git
# Git flow question, merging to master and develop I am currently using git flow with sourcetree. Work is agreed for the sprint and I create branches off develop to commit code into. I merge the feature branches into develop, then at the end of sprint I merge to master and code goes into production. This works fine, ...
> I merge the feature branches into develop, then at the end of sprint I merge to master and code goes into production. You can certainly do that if you wish, but typically in Git Flow you don't merge `develop` *directly* into `master` because of the exact problems you are running into: > This can cause lots of block...
67067686
Git file-level merge conflict caused by Git “suggesting [the file] should perhaps be moved”
7
2021-04-13 01:46:56
<p>I've got a Git repo of Markdown articles, where people create pull requests (one per Markdown article) that eventually get merged to <code>master</code> and then, working directly on <code>master</code>, I move that article into a folder called <em>wordpressed</em> and commit and push to <code>master</code>.</p> <p>...
6,637
341,994
2022-05-23 13:00:51
67,069,465
14
2021-04-13 06:02:23
1,256,452
2021-04-15 23:36:47
https://stackoverflow.com/q/67067686
https://stackoverflow.com/a/67069465
<p>This particular conflict:</p> <blockquote> <pre><code>CONFLICT (file location): dan/homebase.md added in HEAD inside a directory that was renamed in master, suggesting it should perhaps be moved to wordpressed/homebase.md. </code></pre> </blockquote> <p>is a relatively modern invention in Git. Git now tries to find...
<p>This particular conflict:</p> <blockquote> <pre><code>CONFLICT (file location): dan/homebase.md added in HEAD inside a directory that was renamed in master, suggesting it should perhaps be moved to wordpressed/homebase.md. </code></pre> </blockquote> <p>is a relatively modern invention in Git. Git now tries to find...
119, 28897, 106113
git, git-merge, git-merge-conflict
<h1>Git file-level merge conflict caused by Git “suggesting [the file] should perhaps be moved”</h1> <p>I've got a Git repo of Markdown articles, where people create pull requests (one per Markdown article) that eventually get merged to <code>master</code> and then, working directly on <code>master</code>, I move that ...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
22,421
git
# Git file-level merge conflict caused by Git “suggesting [the file] should perhaps be moved” I've got a Git repo of Markdown articles, where people create pull requests (one per Markdown article) that eventually get merged to `master` and then, working directly on `master`, I move that article into a folder called *w...
This particular conflict: > ``` > CONFLICT (file location): dan/homebase.md added in HEAD inside a > directory that was renamed in master, suggesting it should perhaps > be moved to wordpressed/homebase.md. > ``` is a relatively modern invention in Git. Git now tries to find *directory renames* between the merge base...
57223333
agent key RSA SHA256: ... returned incorrect signature type
7
2019-07-26 15:48:51
<p>I'm trying to use CircleCI on a Go project on GitHub with the default template for Go projects.</p> <p>For reference, here's what the default <code>.circleci/config.yml</code> <em>looks like</em> :</p> <pre><code>version: 2 jobs: build: docker: - image: circleci/golang:1.12.7-buster working_directo...
19,536
5,083,247
2019-07-28 03:24:36
57,237,705
14
2019-07-28 03:24:36
8,705,432
2019-07-28 03:24:36
https://stackoverflow.com/q/57223333
https://stackoverflow.com/a/57237705
<p>There are two issues here, which are separate and independent.</p> <p>The "agent key returned incorrect signature type" warning means that the SSH agent that's being used returned invalid data.</p> <p>When you use an RSA SSH key, you can sign with one of several hash algorithms: SHA-1, SHA-256, or SHA-512. Origina...
<p>There are two issues here, which are separate and independent.</p> <p>The "agent key returned incorrect signature type" warning means that the SSH agent that's being used returned invalid data.</p> <p>When you use an RSA SSH key, you can sign with one of several hash algorithms: SHA-1, SHA-256, or SHA-512. Origina...
119, 15627, 90475, 129625
circleci, circleci-2.0, git, go
<h1>agent key RSA SHA256: ... returned incorrect signature type</h1> <p>I'm trying to use CircleCI on a Go project on GitHub with the default template for Go projects.</p> <p>For reference, here's what the default <code>.circleci/config.yml</code> <em>looks like</em> :</p> <pre><code>version: 2 jobs: build: doc...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
22,422
git
# agent key RSA SHA256: ... returned incorrect signature type I'm trying to use CircleCI on a Go project on GitHub with the default template for Go projects. For reference, here's what the default `.circleci/config.yml` *looks like* : ``` version: 2 jobs: build: docker: - image: circleci/golang:1.12.7-bu...
There are two issues here, which are separate and independent. The "agent key returned incorrect signature type" warning means that the SSH agent that's being used returned invalid data. When you use an RSA SSH key, you can sign with one of several hash algorithms: SHA-1, SHA-256, or SHA-512. Originally, only SHA-1 w...
51584986
git blame --color-by-age set as default in git config
7
2018-07-29 22:13:22
<p>I would like to setup <code>git blame --color-by-age</code> as the default behavior whenever I invoke <code>git blame</code>. How would I configure my <code>.gitconfig</code> file to achieve this?</p>
1,513
1,817,185
2018-07-29 22:19:53
51,585,015
14
2018-07-29 22:19:53
707,111
2018-07-29 22:19:53
https://stackoverflow.com/q/51584986
https://stackoverflow.com/a/51585015
<pre><code>git config --global blame.coloring highlightRecent </code></pre> <p>From <a href="https://git-scm.com/docs/git-config#git-config-blamecoloring" rel="noreferrer">git-config(1)</a>:</p> <blockquote> <h3>blame.coloring</h3> <p>This determines the coloring scheme to be applied to blame output. It can be...
<pre><code>git config --global blame.coloring highlightRecent </code></pre> <p>From <a href="https://git-scm.com/docs/git-config#git-config-blamecoloring" rel="noreferrer">git-config(1)</a>:</p> <blockquote> <h3>blame.coloring</h3> <p>This determines the coloring scheme to be applied to blame output. It can be...
119, 32868, 105902
git, git-blame, git-config
<h1>git blame --color-by-age set as default in git config</h1> <p>I would like to setup <code>git blame --color-by-age</code> as the default behavior whenever I invoke <code>git blame</code>. How would I configure my <code>.gitconfig</code> file to achieve this?</p>
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
22,425
git
# git blame --color-by-age set as default in git config I would like to setup `git blame --color-by-age` as the default behavior whenever I invoke `git blame`. How would I configure my `.gitconfig` file to achieve this?
``` git config --global blame.coloring highlightRecent ``` From [git-config(1)](https://git-scm.com/docs/git-config#git-config-blamecoloring): > ### blame.coloring > > This determines the coloring scheme to be applied to blame output. It can be `repeatedLines`, `highlightRecent`, or `none` which is the default. and ...
46757991
Checkout branch with libgit2
7
2017-10-15 17:35:43
<p>I'm trying to implement a simple checkout operation between 2 branches. The code executes without errors.</p> <pre><code>git_libgit2_init(); git_object *treeish = NULL; git_checkout_options opts; opts.checkout_strategy = GIT_CHECKOUT_SAFE; /* branchName in this case is "master" */ handleError(git_revparse_single(&...
3,342
4,907,735
2018-05-22 08:19:06
46,758,861
14
2017-10-15 19:02:16
729,881
2018-05-22 08:19:06
https://stackoverflow.com/q/46757991
https://stackoverflow.com/a/46758861
<p>The <code>git checkout</code> command is exceptionally overloaded. It deals with both putting files on disk (checking out) <em>and</em> switching branches. In particular, <code>git checkout &lt;branch&gt;</code> will update the working directory to match the contents of the given branch <em>and switch to it</em>.<...
<p>The <code>git checkout</code> command is exceptionally overloaded. It deals with both putting files on disk (checking out) <em>and</em> switching branches. In particular, <code>git checkout &lt;branch&gt;</code> will update the working directory to match the contents of the given branch <em>and switch to it</em>.<...
8, 119, 37230, 66800
c, git, git-checkout, libgit2
<h1>Checkout branch with libgit2</h1> <p>I'm trying to implement a simple checkout operation between 2 branches. The code executes without errors.</p> <pre><code>git_libgit2_init(); git_object *treeish = NULL; git_checkout_options opts; opts.checkout_strategy = GIT_CHECKOUT_SAFE; /* branchName in this case is "master...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
22,426
git
# Checkout branch with libgit2 I'm trying to implement a simple checkout operation between 2 branches. The code executes without errors. ``` git_libgit2_init(); git_object *treeish = NULL; git_checkout_options opts; opts.checkout_strategy = GIT_CHECKOUT_SAFE; /* branchName in this case is "master" */ handleError(git...
The `git checkout` command is exceptionally overloaded. It deals with both putting files on disk (checking out) *and* switching branches. In particular, `git checkout <branch>` will update the working directory to match the contents of the given branch *and switch to it*. The libgit2 APIs do not conflate these two ope...
45342640
golang git pulling a repo
7
2017-07-27 06:11:42
<p>I'm very new to golang Im trying to do a git pull from go program. I have looked in to native libraries and found <a href="https://github.com/src-d/go-git/" rel="noreferrer">https://github.com/src-d/go-git/</a>.</p> <p>I has features to of cloning ect. but not pulling. Looking at the source it seems there is a func...
21,020
2,745,288
2022-02-09 10:42:06
45,342,748
14
2017-07-27 06:18:28
3,310,285
2020-01-07 08:24:41
https://stackoverflow.com/q/45342640
https://stackoverflow.com/a/45342748
<p>You should create a Repository struct by cloning a repo: </p> <pre><code>import { git "gopkg.in/src-d/go-git.v4" } repo, err := git.Clone(memory.NewStorage(), nil, &amp;git.CloneOptions{ URL: "https://github.com/src-d/go-siva", }) </code></pre> <p>And then on the repo struct call Pull.</p> <pre><code>err :...
<p>You should create a Repository struct by cloning a repo: </p> <pre><code>import { git "gopkg.in/src-d/go-git.v4" } repo, err := git.Clone(memory.NewStorage(), nil, &amp;git.CloneOptions{ URL: "https://github.com/src-d/go-siva", }) </code></pre> <p>And then on the repo struct call Pull.</p> <pre><code>err :...
119, 4860, 15627
git, go, pull
<h1>golang git pulling a repo</h1> <p>I'm very new to golang Im trying to do a git pull from go program. I have looked in to native libraries and found <a href="https://github.com/src-d/go-git/" rel="noreferrer">https://github.com/src-d/go-git/</a>.</p> <p>I has features to of cloning ect. but not pulling. Looking at ...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
22,427
git
# golang git pulling a repo I'm very new to golang Im trying to do a git pull from go program. I have looked in to native libraries and found <https://github.com/src-d/go-git/>. I has features to of cloning ect. but not pulling. Looking at the source it seems there is a function for pulling as well ``` func (r *Repo...
You should create a Repository struct by cloning a repo: ``` import { git "gopkg.in/src-d/go-git.v4" } repo, err := git.Clone(memory.NewStorage(), nil, &git.CloneOptions{ URL: "https://github.com/src-d/go-siva", }) ``` And then on the repo struct call Pull. ``` err := repo.Pull(&git.PullOptions{ RemoteNam...
36516080
How do I find removed lines with Git?
7
2016-04-09 11:22:53
<p>From time to time, it happens that I want to readd some code which I removed from a repository some time ago. I always use tools like <code>tig</code> to browse the history to find the commit which removed some lines.</p> <p>Is there a way to find removed lines with Git? Something like <code>git-grep</code>, but for...
4,404
1,391,026
2025-04-12 14:47:05
36,516,859
14
2016-04-09 12:37:30
123,109
2025-04-12 14:47:05
https://stackoverflow.com/q/36516080
https://stackoverflow.com/a/36516859
<p>If you remember some keyword, <em>e.g.</em>, the name of a variable or function, in the removed lines, use <a href="https://git-scm.com/docs/gitdiffcore#_diffcore_pickaxe_for_detecting_addition_deletion_of_specified_string" rel="nofollow noreferrer">pickaxe search</a> as in</p> <pre class="lang-none prettyprint-over...
<p>If you remember some keyword, <em>e.g.</em>, the name of a variable or function, in the removed lines, use <a href="https://git-scm.com/docs/gitdiffcore#_diffcore_pickaxe_for_detecting_addition_deletion_of_specified_string" rel="nofollow noreferrer">pickaxe search</a> as in</p> <pre class="lang-none prettyprint-over...
119, 456
git, version-control
<h1>How do I find removed lines with Git?</h1> <p>From time to time, it happens that I want to readd some code which I removed from a repository some time ago. I always use tools like <code>tig</code> to browse the history to find the commit which removed some lines.</p> <p>Is there a way to find removed lines with Git...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
22,428
git
# How do I find removed lines with Git? From time to time, it happens that I want to readd some code which I removed from a repository some time ago. I always use tools like `tig` to browse the history to find the commit which removed some lines. Is there a way to find removed lines with Git? Something like `git-grep...
If you remember some keyword, *e.g.*, the name of a variable or function, in the removed lines, use [pickaxe search](https://git-scm.com/docs/gitdiffcore#_diffcore_pickaxe_for_detecting_addition_deletion_of_specified_string) as in ``` git log -Skeyword ``` or to see the deltas along with the commit messages ``` git ...
29703701
git auto convert file from CRLF to LF not working
7
2015-04-17 15:40:44
<p>On our system, we used to be able to convert all CRLF to LF while committing file into git. Now this feature is gone. </p> <p>Here is what I've done:</p> <pre><code>git config --global core.autocrlf false </code></pre> <p>After doing the above, I use the following command to check:</p> <pre><code>git config --li...
13,336
4,199,129
2015-04-17 16:29:49
29,704,747
14
2015-04-17 16:29:49
4,760,164
2015-04-17 16:29:49
https://stackoverflow.com/q/29703701
https://stackoverflow.com/a/29704747
<p>Since git1.8.1rc1 : </p> <blockquote> <p>"git config --get" used to diagnose presence of multiple definitions of the same variable in the same configuration file as an error, but it now applies the "last one wins" rule used by the internal configuration logic</p> </blockquote> <p>So your second setting app...
<p>Since git1.8.1rc1 : </p> <blockquote> <p>"git config --get" used to diagnose presence of multiple definitions of the same variable in the same configuration file as an error, but it now applies the "last one wins" rule used by the internal configuration logic</p> </blockquote> <p>So your second setting app...
119, 32868
git, git-config
<h1>git auto convert file from CRLF to LF not working</h1> <p>On our system, we used to be able to convert all CRLF to LF while committing file into git. Now this feature is gone. </p> <p>Here is what I've done:</p> <pre><code>git config --global core.autocrlf false </code></pre> <p>After doing the above, I use the ...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
22,431
git
# git auto convert file from CRLF to LF not working On our system, we used to be able to convert all CRLF to LF while committing file into git. Now this feature is gone. Here is what I've done: ``` git config --global core.autocrlf false ``` After doing the above, I use the following command to check: ``` git conf...
Since git1.8.1rc1 : > "git config --get" used to diagnose presence of multiple definitions > of the same variable in the same configuration file as an error, but > it now applies the "last one wins" rule used by the internal > configuration logic So your second setting apply. For more explaination on option for core...
25277599
How to install from a specific git branch with OPAM
7
2014-08-13 03:33:38
<p>I have a project, which offers different features in different git branches. I believe, this is mostly done to simplify external dependencies (that is someone who wants to work with sqlite will not depend on modules for mysql and so on). Unfortunately, the functionality I need does not reside in master.</p> <p>Is t...
1,775
1,106,920
2014-08-13 09:36:51
25,282,035
14
2014-08-13 08:56:47
50,926
2014-08-13 08:56:47
https://stackoverflow.com/q/25277599
https://stackoverflow.com/a/25282035
<p>Use <code>opam pin</code>. Put the branch name after a <code>#</code>, e.g. to use my "checksum" branch of the OCaml <code>tcpip</code> library instead of the upstream one:</p> <pre><code>$ opam pin tcpip https://github.com/talex5/mirage-tcpip.git#checksum </code></pre>
<p>Use <code>opam pin</code>. Put the branch name after a <code>#</code>, e.g. to use my "checksum" branch of the OCaml <code>tcpip</code> library instead of the upstream one:</p> <pre><code>$ opam pin tcpip https://github.com/talex5/mirage-tcpip.git#checksum </code></pre>
119, 87507
git, opam
<h1>How to install from a specific git branch with OPAM</h1> <p>I have a project, which offers different features in different git branches. I believe, this is mostly done to simplify external dependencies (that is someone who wants to work with sqlite will not depend on modules for mysql and so on). Unfortunately, the...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
22,432
git
# How to install from a specific git branch with OPAM I have a project, which offers different features in different git branches. I believe, this is mostly done to simplify external dependencies (that is someone who wants to work with sqlite will not depend on modules for mysql and so on). Unfortunately, the function...
Use `opam pin`. Put the branch name after a `#`, e.g. to use my "checksum" branch of the OCaml `tcpip` library instead of the upstream one: ``` $ opam pin tcpip https://github.com/talex5/mirage-tcpip.git#checksum ```
23555582
Set a specific date for a GIT tag
7
2014-05-09 02:10:57
<p>I want to retroactively add an annotated tag to an old project at some commit back in time.</p> <p>Rather than have annotated tag show today's date, is it possible to set (or edit) the date of a tag?</p>
1,279
617,937
2014-05-09 02:19:20
23,555,601
14
2014-05-09 02:13:03
251,311
2014-05-09 02:19:20
https://stackoverflow.com/q/23555582
https://stackoverflow.com/a/23555601
<pre><code>$ GIT_COMMITTER_DATE="2006-10-02 10:31" git tag -s v1.0.1 </code></pre> <p>References:</p> <ul> <li><a href="https://www.kernel.org/pub/software/scm/git/docs/git-tag.html#_on_backdating_tags" rel="noreferrer">https://www.kernel.org/pub/software/scm/git/docs/git-tag.html#_on_backdating_tags</a></li> </ul>
<pre><code>$ GIT_COMMITTER_DATE="2006-10-02 10:31" git tag -s v1.0.1 </code></pre> <p>References:</p> <ul> <li><a href="https://www.kernel.org/pub/software/scm/git/docs/git-tag.html#_on_backdating_tags" rel="noreferrer">https://www.kernel.org/pub/software/scm/git/docs/git-tag.html#_on_backdating_tags</a></li> </ul>
119
git
<h1>Set a specific date for a GIT tag</h1> <p>I want to retroactively add an annotated tag to an old project at some commit back in time.</p> <p>Rather than have annotated tag show today's date, is it possible to set (or edit) the date of a tag?</p>
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
22,433
git
# Set a specific date for a GIT tag I want to retroactively add an annotated tag to an old project at some commit back in time. Rather than have annotated tag show today's date, is it possible to set (or edit) the date of a tag?
``` $ GIT_COMMITTER_DATE="2006-10-02 10:31" git tag -s v1.0.1 ``` References: - <https://www.kernel.org/pub/software/scm/git/docs/git-tag.html#_on_backdating_tags>
22112204
fatal: Reference has invalid format: 'refs/heads/master~'
7
2014-03-01 08:48:21
<p>When I try any of these commands:</p> <pre><code>git branch git branch -a git pull git log --pretty=format:"%C(yellow)%h%Cred%d\\ %Cblue[%cn]\\%Creset %s" --decorate --graph git log --online --decorate --graph </code></pre> <p>I get the error</p> <pre><code>fatal: Reference has invalid format: 'refs/heads/master~...
9,197
454,780
2015-10-07 11:26:44
22,141,611
14
2014-03-03 08:09:47
19,563
2014-03-03 08:09:47
https://stackoverflow.com/q/22112204
https://stackoverflow.com/a/22141611
<p>It looks like some utility has created "backups" of the normal branch files (<code>.git/refs/heads/...</code>) with a trailing <code>~</code> character. This are not allowed branch names in Git as they would conflict with the suffix notation <code>...~N</code> for obtaining ancestors.</p> <p>Commands that don't nee...
<p>It looks like some utility has created "backups" of the normal branch files (<code>.git/refs/heads/...</code>) with a trailing <code>~</code> character. This are not allowed branch names in Git as they would conflict with the suffix notation <code>...~N</code> for obtaining ancestors.</p> <p>Commands that don't nee...
119
git
<h1>fatal: Reference has invalid format: 'refs/heads/master~'</h1> <p>When I try any of these commands:</p> <pre><code>git branch git branch -a git pull git log --pretty=format:"%C(yellow)%h%Cred%d\\ %Cblue[%cn]\\%Creset %s" --decorate --graph git log --online --decorate --graph </code></pre> <p>I get the error</p> ...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
22,434
git
# fatal: Reference has invalid format: 'refs/heads/master~' When I try any of these commands: ``` git branch git branch -a git pull git log --pretty=format:"%C(yellow)%h%Cred%d\\ %Cblue[%cn]\\%Creset %s" --decorate --graph git log --online --decorate --graph ``` I get the error ``` fatal: Reference has invalid form...
It looks like some utility has created "backups" of the normal branch files (`.git/refs/heads/...`) with a trailing `~` character. This are not allowed branch names in Git as they would conflict with the suffix notation `...~N` for obtaining ancestors. Commands that don't need to query all refs (such as `git log maste...
13565177
How to apply diff between commits to current head in git?
7
2012-11-26 12:48:09
<p>I was working on some topic branch on project I participate in. I normally rebase my branches before making a pull request. This time however, due to changes in master, rebasing is a big pain. Lot of conflicts and, what's worse, after manual merging commits look just ugly and loose their point. I would definitel...
6,448
304,175
2019-07-03 20:24:08
13,565,228
14
2012-11-26 12:51:15
233,014
2019-07-03 20:24:08
https://stackoverflow.com/q/13565177
https://stackoverflow.com/a/13565228
<p>Use <a href="http://www.kernel.org/pub/software/scm/git/docs/git-cherry-pick.html" rel="noreferrer"><code>git cherry-pick --no-commit &lt;commit&gt;...</code></a></p> <p>Then you will get all the changes in the listed commits applied on the top of your branch, and you can commit at your leisure.</p> <hr> <p>If yo...
<p>Use <a href="http://www.kernel.org/pub/software/scm/git/docs/git-cherry-pick.html" rel="noreferrer"><code>git cherry-pick --no-commit &lt;commit&gt;...</code></a></p> <p>Then you will get all the changes in the listed commits applied on the top of your branch, and you can commit at your leisure.</p> <hr> <p>If yo...
119, 9033, 28897
git, git-diff, git-merge
<h1>How to apply diff between commits to current head in git?</h1> <p>I was working on some topic branch on project I participate in. I normally rebase my branches before making a pull request. This time however, due to changes in master, rebasing is a big pain. Lot of conflicts and, what's worse, after manual mergi...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
22,436
git
# How to apply diff between commits to current head in git? I was working on some topic branch on project I participate in. I normally rebase my branches before making a pull request. This time however, due to changes in master, rebasing is a big pain. Lot of conflicts and, what's worse, after manual merging commits l...
Use [`git cherry-pick --no-commit <commit>...`](http://www.kernel.org/pub/software/scm/git/docs/git-cherry-pick.html) Then you will get all the changes in the listed commits applied on the top of your branch, and you can commit at your leisure. --- If you have a more complicated use case, you might want to try [`git...
12193020
File mode with msysgit
7
2012-08-30 08:41:10
<p>I cloned a Git repository from Windows using msysgit (v1.7.7) on a network drive. Some files are marked on the repository to have mode 100755.</p> <p>Using the git bash tool from Windows, the <code>ls -l</code> command effectively shows the good permissions for those file. Now when I access the repository directory...
2,709
2,622,924
2023-04-22 16:57:59
12,193,420
14
2012-08-30 09:04:43
438,742
2012-08-30 09:04:43
https://stackoverflow.com/q/12193020
https://stackoverflow.com/a/12193420
<p>mingw doesn't support file modes as linux does. As I understand it follows windows-extension support, i.e. <code>.exe</code> will have +x bits. But chmod doesn't do anything.</p> <p>So, for git you should specify <code>git config core.filemode false</code> to disable file mode support in mingw. And if you need to c...
<p>mingw doesn't support file modes as linux does. As I understand it follows windows-extension support, i.e. <code>.exe</code> will have +x bits. But chmod doesn't do anything.</p> <p>So, for git you should specify <code>git config core.filemode false</code> to disable file mode support in mingw. And if you need to c...
119, 21628
git, msysgit
<h1>File mode with msysgit</h1> <p>I cloned a Git repository from Windows using msysgit (v1.7.7) on a network drive. Some files are marked on the repository to have mode 100755.</p> <p>Using the git bash tool from Windows, the <code>ls -l</code> command effectively shows the good permissions for those file. Now when I...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
22,439
git
# File mode with msysgit I cloned a Git repository from Windows using msysgit (v1.7.7) on a network drive. Some files are marked on the repository to have mode 100755. Using the git bash tool from Windows, the `ls -l` command effectively shows the good permissions for those file. Now when I access the repository dire...
mingw doesn't support file modes as linux does. As I understand it follows windows-extension support, i.e. `.exe` will have +x bits. But chmod doesn't do anything. So, for git you should specify `git config core.filemode false` to disable file mode support in mingw. And if you need to change it, you should do it under...
1460411
git - removing rails development log
7
2009-09-22 14:26:05
<p>I keep getting the changes made to my development.log in my git repository. My .gitignore file has:</p> <pre><code>log/*.log tmp/**/* doc/api doc/app </code></pre> <p>So I need two things to happen.</p> <ol> <li>Get the development.log file out of my current commit (its now too big for the server to receive)</li...
3,298
111,674
2011-01-13 14:56:06
1,460,436
14
2009-09-22 14:30:58
57,461
2009-09-22 14:36:31
https://stackoverflow.com/q/1460411
https://stackoverflow.com/a/1460436
<pre><code>$ git rm log/development.log $ git commit -m"log too big for the server to receive" </code></pre> <p>An ignorefile won't ignore files that are in the repo, so once development.log is removed everything should work as you expected.</p>
<pre><code>$ git rm log/development.log $ git commit -m"log too big for the server to receive" </code></pre> <p>An ignorefile won't ignore files that are in the repo, so once development.log is removed everything should work as you expected.</p>
119
git
<h1>git - removing rails development log</h1> <p>I keep getting the changes made to my development.log in my git repository. My .gitignore file has:</p> <pre><code>log/*.log tmp/**/* doc/api doc/app </code></pre> <p>So I need two things to happen.</p> <ol> <li>Get the development.log file out of my current commit (...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
22,441
git
# git - removing rails development log I keep getting the changes made to my development.log in my git repository. My .gitignore file has: ``` log/*.log tmp/**/* doc/api doc/app ``` So I need two things to happen. 1. Get the development.log file out of my current commit (its now too big for the server to receive) 2...
``` $ git rm log/development.log $ git commit -m"log too big for the server to receive" ``` An ignorefile won't ignore files that are in the repo, so once development.log is removed everything should work as you expected.
53921655
Rebuild of ED25519 keys with Bouncy Castle (Java)
6
2018-12-25 10:52:03
<p>The latest (beta) version of Bouncy Castle (bcprov-jdk15on-161b20.jar) supports ED25519 and ED448 EC cryptography for signing purposes. I setup this full working example and it works as expected. </p> <p>My question: <strong>did I rebuild the private and public keys correctly</strong> as I didn't found any example ...
11,029
8,166,854
2019-02-27 11:42:14
54,073,962
14
2019-01-07 11:54:52
1,811,877
2019-02-27 11:42:14
https://stackoverflow.com/q/53921655
https://stackoverflow.com/a/54073962
<p>I'm also doing some research into Ed25519 so I've been looking at the BouncyCastle implementation along with Tink and libsodium; I certainly can't see anything wrong with how you're rebuilding the key pair, it seems be consistent with how BouncyCastle is using it in other places: <a href="https://github.com/bcgit/bc...
<p>I'm also doing some research into Ed25519 so I've been looking at the BouncyCastle implementation along with Tink and libsodium; I certainly can't see anything wrong with how you're rebuilding the key pair, it seems be consistent with how BouncyCastle is using it in other places: <a href="https://github.com/bcgit/bc...
17, 4172, 17782
bouncycastle, digital-signature, java
<h1>Rebuild of ED25519 keys with Bouncy Castle (Java)</h1> <p>The latest (beta) version of Bouncy Castle (bcprov-jdk15on-161b20.jar) supports ED25519 and ED448 EC cryptography for signing purposes. I setup this full working example and it works as expected. </p> <p>My question: <strong>did I rebuild the private and pu...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
22,443
git
# Rebuild of ED25519 keys with Bouncy Castle (Java) The latest (beta) version of Bouncy Castle (bcprov-jdk15on-161b20.jar) supports ED25519 and ED448 EC cryptography for signing purposes. I setup this full working example and it works as expected. My question: **did I rebuild the private and public keys correctly** a...
I'm also doing some research into Ed25519 so I've been looking at the BouncyCastle implementation along with Tink and libsodium; I certainly can't see anything wrong with how you're rebuilding the key pair, it seems be consistent with how BouncyCastle is using it in other places: [OpenSSHPrivateKeyUtil](https://github....
53941896
How do I show more digits of haskell's pi?
6
2018-12-27 08:23:11
<p>I'd like to <code>take</code> more digits of the Prelude <code>pi</code> value.</p> <pre><code>Prelude&gt; take 4 $ show pi "3.14" </code></pre> <p>But</p> <pre><code>Prelude&gt; take 17 $ show pi "3.141592653589793" Prelude&gt; take 170 $ show pi "3.141592653589793" </code></pre> <p>Is the <code>pi</code> cons...
2,714
1,052,117
2018-12-29 23:19:25
53,943,254
14
2018-12-27 10:10:24
7,459,445
2018-12-29 23:19:25
https://stackoverflow.com/q/53941896
https://stackoverflow.com/a/53943254
<p><code>pi</code> is a method of the <code>Floating</code> class:</p> <pre><code>class Fractional a =&gt; Floating a where pi :: a ... </code></pre> <p>So <code>pi</code> is polymorphic, and it is up to the implementor of the instance to define it appropriately.</p> <p>The most common instances are <code>Float<...
<p><code>pi</code> is a method of the <code>Floating</code> class:</p> <pre><code>class Fractional a =&gt; Floating a where pi :: a ... </code></pre> <p>So <code>pi</code> is polymorphic, and it is up to the implementor of the instance to define it appropriately.</p> <p>The most common instances are <code>Float<...
1925, 9914, 11404
digits, haskell, show
<h1>How do I show more digits of haskell's pi?</h1> <p>I'd like to <code>take</code> more digits of the Prelude <code>pi</code> value.</p> <pre><code>Prelude&gt; take 4 $ show pi "3.14" </code></pre> <p>But</p> <pre><code>Prelude&gt; take 17 $ show pi "3.141592653589793" Prelude&gt; take 170 $ show pi "3.1415926535...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
22,444
git
# How do I show more digits of haskell's pi? I'd like to `take` more digits of the Prelude `pi` value. ``` Prelude> take 4 $ show pi "3.14" ``` But ``` Prelude> take 17 $ show pi "3.141592653589793" Prelude> take 170 $ show pi "3.141592653589793" ``` Is the `pi` constant just stored this truncated? Is there an op...
`pi` is a method of the `Floating` class: ``` class Fractional a => Floating a where pi :: a ... ``` So `pi` is polymorphic, and it is up to the implementor of the instance to define it appropriately. The most common instances are `Float` and `Double` which have limited precision: ``` Prelude> pi :: Float 3.141...
53121208
$GIT_DIR no longer set in pre-commit hooks
6
2018-11-02 15:12:15
<p>Using $GIT_DIR in pre-commit hook would return the location of the .git directory. Even if it had not been explicitly set to anything, using it in the pre-commit hook would still return you the location. After an update, moving to Git 2.18 this appears to no longer be the case and the behavior of my pre-commit hooks...
2,778
6,915,929
2019-10-28 16:51:39
53,121,209
14
2018-11-02 15:12:15
6,915,929
2019-10-28 16:51:39
https://stackoverflow.com/q/53121208
https://stackoverflow.com/a/53121209
<p>Some really detailed information on this can be found here </p> <p><a href="https://public-inbox.org/git/20180826004150.GA31168@sigill.intra.peff.net/t/" rel="noreferrer">https://public-inbox.org/git/20180826004150.GA31168@sigill.intra.peff.net/t/</a></p> <p>I will attempt to paraphrase to the best of my ability f...
<p>Some really detailed information on this can be found here </p> <p><a href="https://public-inbox.org/git/20180826004150.GA31168@sigill.intra.peff.net/t/" rel="noreferrer">https://public-inbox.org/git/20180826004150.GA31168@sigill.intra.peff.net/t/</a></p> <p>I will attempt to paraphrase to the best of my ability f...
119, 43087
git, githooks
<h1>$GIT_DIR no longer set in pre-commit hooks</h1> <p>Using $GIT_DIR in pre-commit hook would return the location of the .git directory. Even if it had not been explicitly set to anything, using it in the pre-commit hook would still return you the location. After an update, moving to Git 2.18 this appears to no longer...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
22,445
git
# $GIT_DIR no longer set in pre-commit hooks Using $GIT_DIR in pre-commit hook would return the location of the .git directory. Even if it had not been explicitly set to anything, using it in the pre-commit hook would still return you the location. After an update, moving to Git 2.18 this appears to no longer be the c...
Some really detailed information on this can be found here <https://public-inbox.org/git/20180826004150.GA31168@sigill.intra.peff.net/t/> I will attempt to paraphrase to the best of my ability for the sake of question quality. Using $GIT_DIR, when it has not been explicity set, in pre-commit hooks did work pre Git 2...
46030669
Change project repository using git
6
2017-09-04 05:20:23
<p>I have a project I work on. Lets call it <code>foo</code>. This project is in repository in github called <code>foo repository</code>.</p> <p>I want to switch the project to another repository called <code>better foo</code>. I don't want to delete the existing repository. I want to make another one so all my change...
27,726
7,600,556
2017-09-04 05:32:24
46,030,777
14
2017-09-04 05:31:02
3,918,206
2017-09-04 05:31:02
https://stackoverflow.com/q/46030669
https://stackoverflow.com/a/46030777
<p>You can update the remote url to the new repository:</p> <pre><code>git remote set-url origin git://new.repo.url </code></pre> <p>This will leave your existing repository and any changes made will reflect in the new repository.</p>
<p>You can update the remote url to the new repository:</p> <pre><code>git remote set-url origin git://new.repo.url </code></pre> <p>This will leave your existing repository and any changes made will reflect in the new repository.</p>
119
git
<h1>Change project repository using git</h1> <p>I have a project I work on. Lets call it <code>foo</code>. This project is in repository in github called <code>foo repository</code>.</p> <p>I want to switch the project to another repository called <code>better foo</code>. I don't want to delete the existing repository...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
22,447
git
# Change project repository using git I have a project I work on. Lets call it `foo`. This project is in repository in github called `foo repository`. I want to switch the project to another repository called `better foo`. I don't want to delete the existing repository. I want to make another one so all my changes ap...
You can update the remote url to the new repository: ``` git remote set-url origin git://new.repo.url ``` This will leave your existing repository and any changes made will reflect in the new repository.
42842050
How can I use gerrit to push a change as a remote branch to the git repo
6
2017-03-16 18:24:41
<p>I'm using a gerrit project that rebases changes to master. My workflow is</p> <ul> <li>Make changes in a local branch</li> <li>Gerrit push a change</li> <li>My local branch name becomes the gerrit topic for the review</li> <li>On submit in Gerrit, the change gets merged into remote/master.</li> </ul> <p>I wanted t...
13,348
918,944
2017-03-16 21:15:05
42,842,785
14
2017-03-16 19:04:33
7,033,436
2017-03-16 21:15:05
https://stackoverflow.com/q/42842050
https://stackoverflow.com/a/42842785
<p><strong>Create a Branch</strong></p> <p>There is command to create a branch:</p> <p><code>ssh -p 29418 review.example.com gerrit create-branch myproject newbranch master</code></p> <p><a href="https://gerrit-review.googlesource.com/Documentation/cmd-create-branch.html" rel="noreferrer">Reference</a></p> <p>Or, y...
<p><strong>Create a Branch</strong></p> <p>There is command to create a branch:</p> <p><code>ssh -p 29418 review.example.com gerrit create-branch myproject newbranch master</code></p> <p><a href="https://gerrit-review.googlesource.com/Documentation/cmd-create-branch.html" rel="noreferrer">Reference</a></p> <p>Or, y...
119, 52272
gerrit, git
<h1>How can I use gerrit to push a change as a remote branch to the git repo</h1> <p>I'm using a gerrit project that rebases changes to master. My workflow is</p> <ul> <li>Make changes in a local branch</li> <li>Gerrit push a change</li> <li>My local branch name becomes the gerrit topic for the review</li> <li>On subm...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
22,448
git
# How can I use gerrit to push a change as a remote branch to the git repo I'm using a gerrit project that rebases changes to master. My workflow is - Make changes in a local branch - Gerrit push a change - My local branch name becomes the gerrit topic for the review - On submit in Gerrit, the change gets merged into...
**Create a Branch** There is command to create a branch: `ssh -p 29418 review.example.com gerrit create-branch myproject newbranch master` [Reference](https://gerrit-review.googlesource.com/Documentation/cmd-create-branch.html) Or, you can do it like this: ``` git checkout master git push origin HEAD:my_new_branch...
39594021
Rebase a branch from another branch that is rebased from master
6
2016-09-20 12:23:52
<p>I have this scenario:</p> <pre><code>o---o---o---o---o master \ o---o---o---o---o next \ o---o---o topic </code></pre> <p>As above, I did some commits on master and I want to update the other two branches and have:</p> <pre><code>o---o master \ ...
2,311
812,600
2016-09-20 18:42:21
39,601,522
14
2016-09-20 18:42:21
1,256,452
2016-09-20 18:42:21
https://stackoverflow.com/q/39594021
https://stackoverflow.com/a/39601522
<p>There are two relatively easy solutions to this problem. One is to just try the rebase, which might just work. But if not, it's still easy. Here's the second, more powerful way, followed by <em>why</em>:</p> <pre><code>git checkout topic; git rebase --onto next next@{1} </code></pre> <h3>What's going on: how re...
<p>There are two relatively easy solutions to this problem. One is to just try the rebase, which might just work. But if not, it's still easy. Here's the second, more powerful way, followed by <em>why</em>:</p> <pre><code>git checkout topic; git rebase --onto next next@{1} </code></pre> <h3>What's going on: how re...
119, 8974
git, rebase
<h1>Rebase a branch from another branch that is rebased from master</h1> <p>I have this scenario:</p> <pre><code>o---o---o---o---o master \ o---o---o---o---o next \ o---o---o topic </code></pre> <p>As above, I did some commits on master and I want to update...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
22,449
git
# Rebase a branch from another branch that is rebased from master I have this scenario: ``` o---o---o---o---o master \ o---o---o---o---o next \ o---o---o topic ``` As above, I did some commits on master and I want to update the other two branches and have:...
There are two relatively easy solutions to this problem. One is to just try the rebase, which might just work. But if not, it's still easy. Here's the second, more powerful way, followed by *why*: ``` git checkout topic; git rebase --onto next next@{1} ``` ### What's going on: how rebase works The view is, I think, ...
39279901
What algorithm is used during "git rebase"?
6
2016-09-01 19:55:42
<p>I can't find an explanation of how git does a rebase internally.</p> <p>The most frequent answer is about applying patches on a base commit but I don't see how it can be true, because there's no way to correctly apply a patch to a (possibly) completely changed file. Three-way merge is mentioned but without saying pr...
2,114
1,592,297
2021-11-28 00:42:31
39,280,674
14
2016-09-01 20:52:57
1,256,452
2021-11-28 00:42:31
https://stackoverflow.com/q/39279901
https://stackoverflow.com/a/39280674
<p>If you dig through the Git code, you will find that there are in fact multiple different internal (or &quot;back end&quot;) algorithms used for rebase. This has evolved over time: Git 2.26 (March 2020) switched the default from an internal program called <code>git-rebase--am</code> to <code>git-rebase--interactive<...
<p>If you dig through the Git code, you will find that there are in fact multiple different internal (or &quot;back end&quot;) algorithms used for rebase. This has evolved over time: Git 2.26 (March 2020) switched the default from an internal program called <code>git-rebase--am</code> to <code>git-rebase--interactive<...
119
git
<h1>What algorithm is used during "git rebase"?</h1> <p>I can't find an explanation of how git does a rebase internally.</p> <p>The most frequent answer is about applying patches on a base commit but I don't see how it can be true, because there's no way to correctly apply a patch to a (possibly) completely changed fil...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
22,450
git
# What algorithm is used during "git rebase"? I can't find an explanation of how git does a rebase internally. The most frequent answer is about applying patches on a base commit but I don't see how it can be true, because there's no way to correctly apply a patch to a (possibly) completely changed file. Three-way me...
If you dig through the Git code, you will find that there are in fact multiple different internal (or "back end") algorithms used for rebase. This has evolved over time: Git 2.26 (March 2020) switched the default from an internal program called `git-rebase--am` to `git-rebase--interactive`, and Git 2.12 (Feb 2017) swit...
34199374
How could I commit to remote branch one by one automatically
6
2015-12-10 10:25:33
<p>Suppose I have the following commits in my local branch,</p> <p>the oldest is <code>17081fa</code>, the latest is <code>12ba64e</code></p> <p>How could I push these commits to remote git server one by one.</p> <p>Take an example,</p> <pre><code>I don't want to push all local commits at once. the push order shou...
78
551,273
2015-12-10 10:35:33
34,199,528
14
2015-12-10 10:32:08
112,968
2015-12-10 10:35:33
https://stackoverflow.com/q/34199374
https://stackoverflow.com/a/34199528
<p>You can simply specify the full refspec when pushing:</p> <pre><code>git push origin 17081fa:branchname git push origin 30854d2:branchname # etc </code></pre> <hr> <p>If you want to automate it a bit, you could write a litte shell loop which waits for your keypress:</p> <pre><code>for hash in $(git rev-list 1708...
<p>You can simply specify the full refspec when pushing:</p> <pre><code>git push origin 17081fa:branchname git push origin 30854d2:branchname # etc </code></pre> <hr> <p>If you want to automate it a bit, you could write a litte shell loop which waits for your keypress:</p> <pre><code>for hash in $(git rev-list 1708...
119
git
<h1>How could I commit to remote branch one by one automatically</h1> <p>Suppose I have the following commits in my local branch,</p> <p>the oldest is <code>17081fa</code>, the latest is <code>12ba64e</code></p> <p>How could I push these commits to remote git server one by one.</p> <p>Take an example,</p> <pre><cod...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
22,452
git
# How could I commit to remote branch one by one automatically Suppose I have the following commits in my local branch, the oldest is `17081fa`, the latest is `12ba64e` How could I push these commits to remote git server one by one. Take an example, ``` I don't want to push all local commits at once. the push ord...
You can simply specify the full refspec when pushing: ``` git push origin 17081fa:branchname git push origin 30854d2:branchname # etc ``` --- If you want to automate it a bit, you could write a litte shell loop which waits for your keypress: ``` for hash in $(git rev-list 17081fa^..12ba64e); do read -p "Pushing $...
32876426
How can I use JGit to add deleted files to the index?
6
2015-09-30 22:10:40
<p>I want to add to the index all the modifications made in a folder:</p> <ul> <li>files modified</li> <li>files added</li> <li>files removed</li> </ul> <pre class="lang-java prettyprint-override"><code>File gitDir = new File("/home/franck/Repositories/Git/Sandbox/.git"); try (Repository repo = new RepositoryBuilder(...
4,635
3,522,666
2020-08-14 18:43:19
32,880,372
14
2015-10-01 05:58:31
2,986,905
2020-08-14 18:43:19
https://stackoverflow.com/q/32876426
https://stackoverflow.com/a/32880372
<p>To <em>add</em> a deleted file to the index so that it will be deleted when committing you need to use the <code>RmCommand</code>.</p> <p>Just like you would do with native Git</p> <pre><code>git rm test.txt </code></pre> <p>you can do in JGit</p> <pre class="lang-java prettyprint-override"><code>git.rm().addFilepat...
<p>To <em>add</em> a deleted file to the index so that it will be deleted when committing you need to use the <code>RmCommand</code>.</p> <p>Just like you would do with native Git</p> <pre><code>git rm test.txt </code></pre> <p>you can do in JGit</p> <pre class="lang-java prettyprint-override"><code>git.rm().addFilepat...
61058
jgit
<h1>How can I use JGit to add deleted files to the index?</h1> <p>I want to add to the index all the modifications made in a folder:</p> <ul> <li>files modified</li> <li>files added</li> <li>files removed</li> </ul> <pre class="lang-java prettyprint-override"><code>File gitDir = new File("/home/franck/Repositories/Gi...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
22,453
git
# How can I use JGit to add deleted files to the index? I want to add to the index all the modifications made in a folder: - files modified - files added - files removed ``` File gitDir = new File("/home/franck/Repositories/Git/Sandbox/.git"); try (Repository repo = new RepositoryBuilder().setGitDir(gitDir).build())...
To *add* a deleted file to the index so that it will be deleted when committing you need to use the `RmCommand`. Just like you would do with native Git ``` git rm test.txt ``` you can do in JGit ``` git.rm().addFilepattern("test.txt").call(); ``` This will add `test.txt` to the index and mark it as to be deleted. ...
32069407
cloning a version and removing all commits history
6
2015-08-18 10:07:21
<p>I am releasing a private repository to be accessible by public. I need to release a particular version of the repo (the one my report is based on), and then remove all the commits history from this released version.</p> <p>A simple solution is cloning the version first, and then removing all the git footprints from...
5,698
3,639,557
2015-08-18 15:13:22
32,069,753
14
2015-08-18 10:24:05
544,057
2015-08-18 12:27:04
https://stackoverflow.com/q/32069407
https://stackoverflow.com/a/32069753
<p>I would just make a copy of the entire repo at the desired revision, then do the following on <strong>the copy</strong>:</p> <ul> <li>delete the <code>.git</code> directory</li> <li>do <code>git init</code> </li> <li>commit the desired revision </li> </ul> <p>I don't see any problem with this.</p>
<p>I would just make a copy of the entire repo at the desired revision, then do the following on <strong>the copy</strong>:</p> <ul> <li>delete the <code>.git</code> directory</li> <li>do <code>git init</code> </li> <li>commit the desired revision </li> </ul> <p>I don't see any problem with this.</p>
119
git
<h1>cloning a version and removing all commits history</h1> <p>I am releasing a private repository to be accessible by public. I need to release a particular version of the repo (the one my report is based on), and then remove all the commits history from this released version.</p> <p>A simple solution is cloning the ...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
22,454
git
# cloning a version and removing all commits history I am releasing a private repository to be accessible by public. I need to release a particular version of the repo (the one my report is based on), and then remove all the commits history from this released version. A simple solution is cloning the version first, a...
I would just make a copy of the entire repo at the desired revision, then do the following on **the copy**: - delete the `.git` directory - do `git init` - commit the desired revision I don't see any problem with this.
28331815
How do you remove files from one and only one branch in git
6
2015-02-04 21:29:47
<p>I want a branch to hold all the files from my master branch except for foo.txt and foo2.txt. How do I do this?</p>
9,663
678,392
2015-02-18 05:24:26
28,331,872
14
2015-02-04 21:33:17
3,920,143
2015-02-18 05:24:26
https://stackoverflow.com/q/28331815
https://stackoverflow.com/a/28331872
<p>You have to branch off from master. Check out a new branch and remove the files you do not want.</p> <pre><code>git checkout master </code></pre> <p>Once in master:</p> <pre><code>git checkout -b new_branch rm foo.txt rm foo2.txt git add -u git commit -m "removed foo and foo2" git push origin new_branch </code>...
<p>You have to branch off from master. Check out a new branch and remove the files you do not want.</p> <pre><code>git checkout master </code></pre> <p>Once in master:</p> <pre><code>git checkout -b new_branch rm foo.txt rm foo2.txt git add -u git commit -m "removed foo and foo2" git push origin new_branch </code>...
119, 76220
git, git-branch
<h1>How do you remove files from one and only one branch in git</h1> <p>I want a branch to hold all the files from my master branch except for foo.txt and foo2.txt. 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
22,456
git
# How do you remove files from one and only one branch in git I want a branch to hold all the files from my master branch except for foo.txt and foo2.txt. How do I do this?
You have to branch off from master. Check out a new branch and remove the files you do not want. ``` git checkout master ``` Once in master: ``` git checkout -b new_branch rm foo.txt rm foo2.txt git add -u git commit -m "removed foo and foo2" git push origin new_branch ```
26214497
Is there a way to use private git repository with Berkshelf
6
2014-10-06 10:39:46
<p>I created a cookbook named <code>foo</code>, and want to use with <code>Berkshelf</code>.</p> <p>I wrote like this in <code>Berksfile</code>:</p> <pre><code>cookbook 'foo', git: 'https://bitbucket.org/ironsand/cookbook-foo.git' </code></pre> <p>Then vendor the cookbook to <code>cookbooks</code> directory, but it ...
4,091
1,536,527
2014-10-06 16:36:46
26,217,038
14
2014-10-06 13:15:26
4,070,979
2014-10-06 16:36:46
https://stackoverflow.com/q/26214497
https://stackoverflow.com/a/26217038
<p>If you want to use ssh authentication with your git provider, you need to use an SSH URL. Try something like this:</p> <pre><code>cookbook 'foo', git: 'git@bitbucket.org/ironsand/cookbook-foo.git' </code></pre> <p>That will use your SSH key to authenticate.</p>
<p>If you want to use ssh authentication with your git provider, you need to use an SSH URL. Try something like this:</p> <pre><code>cookbook 'foo', git: 'git@bitbucket.org/ironsand/cookbook-foo.git' </code></pre> <p>That will use your SSH key to authenticate.</p>
119, 46913, 89758
berkshelf, chef-infra, git
<h1>Is there a way to use private git repository with Berkshelf</h1> <p>I created a cookbook named <code>foo</code>, and want to use with <code>Berkshelf</code>.</p> <p>I wrote like this in <code>Berksfile</code>:</p> <pre><code>cookbook 'foo', git: 'https://bitbucket.org/ironsand/cookbook-foo.git' </code></pre> <p>...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
22,457
git
# Is there a way to use private git repository with Berkshelf I created a cookbook named `foo`, and want to use with `Berkshelf`. I wrote like this in `Berksfile`: ``` cookbook 'foo', git: 'https://bitbucket.org/ironsand/cookbook-foo.git' ``` Then vendor the cookbook to `cookbooks` directory, but it failed with err...
If you want to use ssh authentication with your git provider, you need to use an SSH URL. Try something like this: ``` cookbook 'foo', git: 'git@bitbucket.org/ironsand/cookbook-foo.git' ``` That will use your SSH key to authenticate.
24414854
Git push error: "! [rejected] develop -> develop (non-fast-forward)"
6
2014-06-25 17:18:54
<p>I have a list of commits (newest first):</p> <pre><code>abcd4 message abcd3 wrong commit message2 abcd2 wrong commit message1 abcd1 message </code></pre> <p>I need to change commit messages of <code>abcd2</code> and <code>abcd3</code>. I'm doing it the following way:</p> <pre><code>rebase -i abcd1 </code></pre> ...
26,092
3,174,320
2014-06-25 17:48:44
24,414,969
14
2014-06-25 17:25:59
3,479,699
2014-06-25 17:25:59
https://stackoverflow.com/q/24414854
https://stackoverflow.com/a/24414969
<p>You should be able to force the push with (assuming you have bitbucket set up as the remote "origin"):</p> <pre><code>git checkout develop git push -f origin develop </code></pre> <p>Note that before you do that you may need to reset your local develop branch (if it's now pointing at your pulled/merged commit):</p...
<p>You should be able to force the push with (assuming you have bitbucket set up as the remote "origin"):</p> <pre><code>git checkout develop git push -f origin develop </code></pre> <p>Note that before you do that you may need to reset your local develop branch (if it's now pointing at your pulled/merged commit):</p...
119, 8337
bitbucket, git
<h1>Git push error: "! [rejected] develop -> develop (non-fast-forward)"</h1> <p>I have a list of commits (newest first):</p> <pre><code>abcd4 message abcd3 wrong commit message2 abcd2 wrong commit message1 abcd1 message </code></pre> <p>I need to change commit messages of <code>abcd2</code> and <code>abcd3</code>. I...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
22,458
git
# Git push error: "! [rejected] develop -> develop (non-fast-forward)" I have a list of commits (newest first): ``` abcd4 message abcd3 wrong commit message2 abcd2 wrong commit message1 abcd1 message ``` I need to change commit messages of `abcd2` and `abcd3`. I'm doing it the following way: ``` rebase -i abcd1 ```...
You should be able to force the push with (assuming you have bitbucket set up as the remote "origin"): ``` git checkout develop git push -f origin develop ``` Note that before you do that you may need to reset your local develop branch (if it's now pointing at your pulled/merged commit): ``` git checkout develop git...
16152407
How can I resume a git history rewrite?
6
2013-04-22 16:47:22
<p>I'm rewriting the history of a fairly big repo using <code>git filter-branch --tree-filter</code> and it's taking a few hours. I see that git is using a temporary directory to store its intermediate work as it goes along. Does that mean it's possible to resume a rewrite if it gets interrupted? If so, how?</p> <p><s...
2,482
152,347
2016-01-22 03:36:39
16,154,016
14
2013-04-22 18:22:04
438,886
2013-04-23 08:31:09
https://stackoverflow.com/q/16152407
https://stackoverflow.com/a/16154016
<p><code>git filter-branch</code> doesn't itself support a suspend/resume pattern of use - although it writes temporary data out to a <code>.git-rewrite</code> folder, there's no actual support for resuming based on the contents of this directory. If you run <code>git filter-branch</code> on a repository that's had a p...
<p><code>git filter-branch</code> doesn't itself support a suspend/resume pattern of use - although it writes temporary data out to a <code>.git-rewrite</code> folder, there's no actual support for resuming based on the contents of this directory. If you run <code>git filter-branch</code> on a repository that's had a p...
119, 46509, 91259
git, git-filter-branch, git-rewrite-history
<h1>How can I resume a git history rewrite?</h1> <p>I'm rewriting the history of a fairly big repo using <code>git filter-branch --tree-filter</code> and it's taking a few hours. I see that git is using a temporary directory to store its intermediate work as it goes along. Does that mean it's possible to resume a rewri...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
22,464
git
# How can I resume a git history rewrite? I'm rewriting the history of a fairly big repo using `git filter-branch --tree-filter` and it's taking a few hours. I see that git is using a temporary directory to store its intermediate work as it goes along. Does that mean it's possible to resume a rewrite if it gets interr...
`git filter-branch` doesn't itself support a suspend/resume pattern of use - although it writes temporary data out to a `.git-rewrite` folder, there's no actual support for resuming based on the contents of this directory. If you run `git filter-branch` on a repository that's had a previously aborted `filter-branch` op...
15459335
Why does .meteor have a .gitignore file?
6
2013-03-17 09:37:55
<p>I am creating a new meteor app and would like to put the whole thing under git source control. When cloning a working copy of my meteor directory, meteor gives : run: You're not in a Meteor project directory.</p> <p>After inspecting the .meteor directory, I see that the files in here are being excluded in my local ...
3,251
2,178,954
2015-02-10 04:55:47
15,462,047
14
2013-03-17 14:46:33
476,884
2013-03-17 14:46:33
https://stackoverflow.com/q/15459335
https://stackoverflow.com/a/15462047
<p>as @Swadq already pointed about, the .meteor directory is Meteor's directory. It contains a folder and a file. </p> <p>The <code>local</code> directory contains the compiled version of your application and some database information (lock-file and the actual raw data of mongodb). This of course should not be includ...
<p>as @Swadq already pointed about, the .meteor directory is Meteor's directory. It contains a folder and a file. </p> <p>The <code>local</code> directory contains the compiled version of your application and some database information (lock-file and the actual raw data of mongodb). This of course should not be includ...
456, 25056, 79111
gitignore, meteor, version-control
<h1>Why does .meteor have a .gitignore file?</h1> <p>I am creating a new meteor app and would like to put the whole thing under git source control. When cloning a working copy of my meteor directory, meteor gives : run: You're not in a Meteor project directory.</p> <p>After inspecting the .meteor directory, I see that...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
22,465
git
# Why does .meteor have a .gitignore file? I am creating a new meteor app and would like to put the whole thing under git source control. When cloning a working copy of my meteor directory, meteor gives : run: You're not in a Meteor project directory. After inspecting the .meteor directory, I see that the files in he...
as @Swadq already pointed about, the .meteor directory is Meteor's directory. It contains a folder and a file. The `local` directory contains the compiled version of your application and some database information (lock-file and the actual raw data of mongodb). This of course should not be included in your VCS. The `p...
7959462
Is there any harm letting a git branch "grow old"?
6
2011-10-31 20:40:13
<p>So I've heard of the <a href="http://codingsolutions.blogspot.com/2011/07/using-branch-per-feature-cleanup-across.html" rel="noreferrer">branch-per-feature</a> workflow using Git, and I've also read some reasons why <a href="http://martinfowler.com/bliki/FeatureBranch.html" rel="noreferrer">this could be a bad idea<...
1,549
344,286
2011-10-31 23:20:04
7,960,765
14
2011-10-31 22:56:51
14,660
2011-10-31 22:56:51
https://stackoverflow.com/q/7959462
https://stackoverflow.com/a/7960765
<p>When I use feature branches, I like to retain the fact that a feature was developed in a branch after the merge. That makes browsing the history much easier. It groups changes by feature or bug and makes it easier to know the most important thing: why a change was done.</p> <p>Which is why when I merge, I deliber...
<p>When I use feature branches, I like to retain the fact that a feature was developed in a branch after the merge. That makes browsing the history much easier. It groups changes by feature or bug and makes it easier to know the most important thing: why a change was done.</p> <p>Which is why when I merge, I deliber...
119, 76220
git, git-branch
<h1>Is there any harm letting a git branch "grow old"?</h1> <p>So I've heard of the <a href="http://codingsolutions.blogspot.com/2011/07/using-branch-per-feature-cleanup-across.html" rel="noreferrer">branch-per-feature</a> workflow using Git, and I've also read some reasons why <a href="http://martinfowler.com/bliki/Fe...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
22,466
git
# Is there any harm letting a git branch "grow old"? So I've heard of the [branch-per-feature](http://codingsolutions.blogspot.com/2011/07/using-branch-per-feature-cleanup-across.html) workflow using Git, and I've also read some reasons why [this could be a bad idea](http://martinfowler.com/bliki/FeatureBranch.html). ...
When I use feature branches, I like to retain the fact that a feature was developed in a branch after the merge. That makes browsing the history much easier. It groups changes by feature or bug and makes it easier to know the most important thing: why a change was done. Which is why when I merge, I deliberately disabl...
6403982
Accessing source files from git BARE:master
6
2011-06-19 17:30:50
<p>I'm certain that I'm missing something fundamental here, but I've received a drop of an application stored in a git repository. It has folders like: branches, hooks, objects, etc, but no actual source files.</p> <p>When I open up git bash and cd into that folder, the title says "(BARE:master)".</p> <p>I assume I j...
9,685
5,416
2011-06-19 18:15:43
6,404,014
14
2011-06-19 17:35:44
104,344
2011-06-19 18:02:58
https://stackoverflow.com/q/6403982
https://stackoverflow.com/a/6404014
<p>It is bare repository what you have.</p> <p>The simplest way to get sources is to clone it via <code>git clone /path/to/your/bare/rep</code></p> <p>The bare repositories is something like shared repository, where work from several developers get gathered. For developer box you most probably want non-bare one.</p> ...
<p>It is bare repository what you have.</p> <p>The simplest way to get sources is to clone it via <code>git clone /path/to/your/bare/rep</code></p> <p>The bare repositories is something like shared repository, where work from several developers get gathered. For developer box you most probably want non-bare one.</p> ...
119
git
<h1>Accessing source files from git BARE:master</h1> <p>I'm certain that I'm missing something fundamental here, but I've received a drop of an application stored in a git repository. It has folders like: branches, hooks, objects, etc, but no actual source files.</p> <p>When I open up git bash and cd into that folder,...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
22,467
git
# Accessing source files from git BARE:master I'm certain that I'm missing something fundamental here, but I've received a drop of an application stored in a git repository. It has folders like: branches, hooks, objects, etc, but no actual source files. When I open up git bash and cd into that folder, the title says ...
It is bare repository what you have. The simplest way to get sources is to clone it via `git clone /path/to/your/bare/rep` The bare repositories is something like shared repository, where work from several developers get gathered. For developer box you most probably want non-bare one. There's a [chapter](http://prog...
1704360
Git Hook: Take action when a branch is advanced
6
2009-11-09 22:27:06
<p>I'm looking to build and publish a latex document every time I advance the tip of a specific branch.</p> <p>I'm looking at what hook I should be putting my build script and which conditions I need to check for.</p>
3,495
5,387
2013-01-24 09:53:40
3,889,157
14
2010-10-08 09:11:47
108,371
2013-01-24 09:53:40
https://stackoverflow.com/q/1704360
https://stackoverflow.com/a/3889157
<p>Probably a little late... but you can find out which branch was committed to by using</p> <pre><code>if [ `git rev-parse --abbrev-ref HEAD` = "master" ]; then ... fi </code></pre> <p>in you script when you checked out the branch to commit in it. </p>
<p>Probably a little late... but you can find out which branch was committed to by using</p> <pre><code>if [ `git rev-parse --abbrev-ref HEAD` = "master" ]; then ... fi </code></pre> <p>in you script when you checked out the branch to commit in it. </p>
119, 853, 43087
git, githooks, hook
<h1>Git Hook: Take action when a branch is advanced</h1> <p>I'm looking to build and publish a latex document every time I advance the tip of a specific branch.</p> <p>I'm looking at what hook I should be putting my build script and which conditions I need to check for.</p>
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
22,468
git
# Git Hook: Take action when a branch is advanced I'm looking to build and publish a latex document every time I advance the tip of a specific branch. I'm looking at what hook I should be putting my build script and which conditions I need to check for.
Probably a little late... but you can find out which branch was committed to by using ``` if [ `git rev-parse --abbrev-ref HEAD` = "master" ]; then ... fi ``` in you script when you checked out the branch to commit in it.
9953299
Git submodules not updating in Jenkins build
96
2012-03-31 05:33:59
<p>I have a submodule in a project in Jenkins. I've enabled the advanced setting to recursively update submodules.</p> <p>When I run the build, I see that the workspace has the files from the submodule. The problem is, it seems to be the first revision of the submodule. When I push changes (repository hosted on GitHub...
117,262
372,405
2024-04-04 17:03:03
9,953,493
13
2012-03-31 06:12:15
372,405
2018-08-12 07:25:33
https://stackoverflow.com/q/9953299
https://stackoverflow.com/a/9953493
<p>It looks like I found a solution:</p> <p>I added a build step to execute the following shell commands:</p> <pre><code>git submodule foreach git checkout master git submodule foreach git pull </code></pre>
<p>It looks like I found a solution:</p> <p>I added a build step to execute the following shell commands:</p> <pre><code>git submodule foreach git checkout master git submodule foreach git pull </code></pre>
119, 41612, 64999
git, git-submodules, jenkins
<h1>Git submodules not updating in Jenkins build</h1> <p>I have a submodule in a project in Jenkins. I've enabled the advanced setting to recursively update submodules.</p> <p>When I run the build, I see that the workspace has the files from the submodule. The problem is, it seems to be the first revision of the submo...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
22,469
git
# Git submodules not updating in Jenkins build I have a submodule in a project in Jenkins. I've enabled the advanced setting to recursively update submodules. When I run the build, I see that the workspace has the files from the submodule. The problem is, it seems to be the first revision of the submodule. When I pus...
It looks like I found a solution: I added a build step to execute the following shell commands: ``` git submodule foreach git checkout master git submodule foreach git pull ```
18813847
'cannot open git-upload-pack' error in Eclipse when cloning or pushing git repository
72
2013-09-15 15:03:16
<p>I am not able to clone or push to a git repository at Bitbucket in Eclipse:</p> <p><img src="https://i.sstatic.net/N2Lu8.png" alt="Error &#39;cannot open git-upload-pack&#39;"></p> <p>It's weird, because a day before I didn't have any problem. I have downloaded the sts 3 times with no luck. This error keeps showin...
315,339
2,305,781
2022-04-21 12:28:13
18,815,859
13
2013-09-15 18:21:45
2,305,781
2017-02-20 11:44:14
https://stackoverflow.com/q/18813847
https://stackoverflow.com/a/18815859
<p>Finally I made it work thanks to the <a href="http://www.eclipse.org/forums/index.php?t=msg&amp;goto=648905&amp;S=9bcfa96ab726d744d41a19c7fb02d723#msg_648905" rel="noreferrer">steps outlined in the Eclipse forum</a>:</p> <h1>Set up the SSH key stuff</h1> <ol> <li>Download and install mysys git according to the git...
<p>Finally I made it work thanks to the <a href="http://www.eclipse.org/forums/index.php?t=msg&amp;goto=648905&amp;S=9bcfa96ab726d744d41a19c7fb02d723#msg_648905" rel="noreferrer">steps outlined in the Eclipse forum</a>:</p> <h1>Set up the SSH key stuff</h1> <ol> <li>Download and install mysys git according to the git...
53, 119, 8337, 43702, 90056
atlassian-sourcetree, bitbucket, eclipse, egit, git
<h1>'cannot open git-upload-pack' error in Eclipse when cloning or pushing git repository</h1> <p>I am not able to clone or push to a git repository at Bitbucket in Eclipse:</p> <p><img src="https://i.sstatic.net/N2Lu8.png" alt="Error &#39;cannot open git-upload-pack&#39;"></p> <p>It's weird, because a day before I d...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
22,470
git
# 'cannot open git-upload-pack' error in Eclipse when cloning or pushing git repository I am not able to clone or push to a git repository at Bitbucket in Eclipse: ![Error 'cannot open git-upload-pack'](https://i.sstatic.net/N2Lu8.png) It's weird, because a day before I didn't have any problem. I have downloaded the...
Finally I made it work thanks to the [steps outlined in the Eclipse forum](http://www.eclipse.org/forums/index.php?t=msg&goto=648905&S=9bcfa96ab726d744d41a19c7fb02d723#msg_648905): # Set up the SSH key stuff 1. Download and install mysys git according to the github instructions at <http://help.github.com/win-git-inst...
25068543
What exactly do we mean by "branch"?
58
2014-07-31 20:41:26
<h1>Long story short...</h1> <p>As far as I can tell, the term "branch" (in Git parlance) may refer to related but different things:</p> <ol> <li>a non-symbolic reference/pointer to a commit,</li> <li>the name of such a reference (e.g. "master"),</li> <li>the subgraph of the repository's commit DAG composed of all th...
12,022
2,541,573
2018-04-26 16:55:33
25,076,593
13
2014-08-01 09:04:13
1,256,452
2018-04-26 16:55:33
https://stackoverflow.com/q/25068543
https://stackoverflow.com/a/25076593
<p>You are correct.</p> <p>We can further split your item 1 by separating "local" and "remote" branch labels: local branches (local labels) are names that start (internally—many front-end command hide this) with <code>refs/heads/</code>, while "remote branches"—which are also called "remote-tracking branches"—start wi...
<p>You are correct.</p> <p>We can further split your item 1 by separating "local" and "remote" branch labels: local branches (local labels) are names that start (internally—many front-end command hide this) with <code>refs/heads/</code>, while "remote branches"—which are also called "remote-tracking branches"—start wi...
119, 1879, 3819
branch, git, terminology
<h1>What exactly do we mean by "branch"?</h1> <h1>Long story short...</h1> <p>As far as I can tell, the term "branch" (in Git parlance) may refer to related but different things:</p> <ol> <li>a non-symbolic reference/pointer to a commit,</li> <li>the name of such a reference (e.g. "master"),</li> <li>the subgraph of ...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
22,471
git
# What exactly do we mean by "branch"? # Long story short... As far as I can tell, the term "branch" (in Git parlance) may refer to related but different things: 1. a non-symbolic reference/pointer to a commit, 2. the name of such a reference (e.g. "master"), 3. the subgraph of the repository's commit DAG composed o...
You are correct. We can further split your item 1 by separating "local" and "remote" branch labels: local branches (local labels) are names that start (internally—many front-end command hide this) with `refs/heads/`, while "remote branches"—which are also called "remote-tracking branches"—start with `refs/remotes/` an...
53502654
How do I run a code formatter over my source without modifying git history?
47
2018-11-27 15:13:24
<p>I am trying to format an entire repo using a code formatter tool. In doing so, I want to keep information about who committed which line, so that commands like <code>git blame</code> still show the correct information. By this, I mean it should show the author that previously edited each line (before it was formatte...
25,064
2,620,595
2021-09-09 12:45:15
53,503,461
13
2018-11-27 15:56:16
7,050,130
2018-11-27 15:56:16
https://stackoverflow.com/q/53502654
https://stackoverflow.com/a/53503461
<p>What you are trying to do is impossible. You cannot, at some point in time, change a line of code, and yet have git report that the most recent change to that line of code is something that happened before that point in time.</p> <p>I suppose a source control tool <em>could</em> support the idea of an "unimportant...
<p>What you are trying to do is impossible. You cannot, at some point in time, change a line of code, and yet have git report that the most recent change to that line of code is something that happened before that point in time.</p> <p>I suppose a source control tool <em>could</em> support the idea of an "unimportant...
119, 555, 46509, 126212
formatting, git, git-filter-branch, prettier
<h1>How do I run a code formatter over my source without modifying git history?</h1> <p>I am trying to format an entire repo using a code formatter tool. In doing so, I want to keep information about who committed which line, so that commands like <code>git blame</code> still show the correct information. By this, I me...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
22,473
git
# How do I run a code formatter over my source without modifying git history? I am trying to format an entire repo using a code formatter tool. In doing so, I want to keep information about who committed which line, so that commands like `git blame` still show the correct information. By this, I mean it should show th...
What you are trying to do is impossible. You cannot, at some point in time, change a line of code, and yet have git report that the most recent change to that line of code is something that happened before that point in time. I suppose a source control tool *could* support the idea of an "unimportant change", where yo...
1395053
Why does git branch -t fail with "Not tracking: ambiguous information"?
35
2009-09-08 16:53:14
<p>When I try to create a new branch tracking a remote branch, I get this:</p> <pre><code>$ git branch -t test origin/foo error: Not tracking: ambiguous information for ref refs/remotes/origin/foo </code></pre> <p><a href="http://github.com/git/git/blob/5ad9dce7e691106fecde413de8cc321b937367a6/branch.c" rel="noreferr...
15,846
7,806
2022-04-21 21:40:05
1,856,506
13
2009-12-06 20:29:59
7,806
2010-01-29 22:54:42
https://stackoverflow.com/q/1395053
https://stackoverflow.com/a/1856506
<p>Got it! The problem was that I have previously set up a remote with <code>--mirror</code>, for the purpose of having a backup / public copy of my repository.</p> <p>If you run</p> <pre><code>git remote add --mirror &lt;name&gt; &lt;url&gt; </code></pre> <p>it does not only flag the remote as mirror (which is what...
<p>Got it! The problem was that I have previously set up a remote with <code>--mirror</code>, for the purpose of having a backup / public copy of my repository.</p> <p>If you run</p> <pre><code>git remote add --mirror &lt;name&gt; &lt;url&gt; </code></pre> <p>it does not only flag the remote as mirror (which is what...
119, 1879
branch, git
<h1>Why does git branch -t fail with "Not tracking: ambiguous information"?</h1> <p>When I try to create a new branch tracking a remote branch, I get this:</p> <pre><code>$ git branch -t test origin/foo error: Not tracking: ambiguous information for ref refs/remotes/origin/foo </code></pre> <p><a href="http://github....
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
22,475
git
# Why does git branch -t fail with "Not tracking: ambiguous information"? When I try to create a new branch tracking a remote branch, I get this: ``` $ git branch -t test origin/foo error: Not tracking: ambiguous information for ref refs/remotes/origin/foo ``` [The source](http://github.com/git/git/blob/5ad9dce7e691...
Got it! The problem was that I have previously set up a remote with `--mirror`, for the purpose of having a backup / public copy of my repository. If you run ``` git remote add --mirror <name> <url> ``` it does not only flag the remote as mirror (which is what I wanted for pushes), but also configures `remote.<mirro...
18082830
Reverting a series of pushed merges and commits in Git (without rewriting history)
33
2013-08-06 14:20:59
<h1>Context</h1> <p>One of my teammates mistakenly pushed some commits to our main development branch. We're a small, collocated team. Our remote repository is hosted on an internal server.</p> <p>Here is the top of our commit log (all these commits have already been pushed):</p> <pre><code>$ git log develop -6 --prett...
40,811
195,964
2025-05-29 13:48:59
18,107,809
13
2013-08-07 15:44:31
1,290,731
2013-08-07 15:44:31
https://stackoverflow.com/q/18082830
https://stackoverflow.com/a/18107809
<p>You have a small co-located team, so communication isn't a problem. Make the commit history look as it should have looked:</p> <pre><code>git branch -f develop dab4896 git branch newfeature 8c29252 git push -f origin develop newfeature </code></pre> <p>and have everyone refetch. You're done.</p> <p>This kind of...
<p>You have a small co-located team, so communication isn't a problem. Make the commit history look as it should have looked:</p> <pre><code>git branch -f develop dab4896 git branch newfeature 8c29252 git push -f origin develop newfeature </code></pre> <p>and have everyone refetch. You're done.</p> <p>This kind of...
119, 34403
git, git-revert
<h1>Reverting a series of pushed merges and commits in Git (without rewriting history)</h1> <h1>Context</h1> <p>One of my teammates mistakenly pushed some commits to our main development branch. We're a small, collocated team. Our remote repository is hosted on an internal server.</p> <p>Here is the top of our commit l...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
22,478
git
# Reverting a series of pushed merges and commits in Git (without rewriting history) # Context One of my teammates mistakenly pushed some commits to our main development branch. We're a small, collocated team. Our remote repository is hosted on an internal server. Here is the top of our commit log (all these commits...
You have a small co-located team, so communication isn't a problem. Make the commit history look as it should have looked: ``` git branch -f develop dab4896 git branch newfeature 8c29252 git push -f origin develop newfeature ``` and have everyone refetch. You're done. This kind of mistake is one of the reasons to re...
42467062
Commit a single file to another branch
31
2017-02-26 09:58:24
<p>I'm on branch <code>feature-x</code> doing some work, when I suddenly encounter an issue which should really be solved on another branch, <code>hotfix</code>.</p> <p>I want to create a commit with that change, but on the <code>hotfix</code> branch.</p> <p>From <a href="https://stackoverflow.com/questions/2944469/h...
28,455
80,766
2017-03-02 16:55:00
42,467,121
13
2017-02-26 10:04:11
3,118,209
2017-03-02 16:55:00
https://stackoverflow.com/q/42467062
https://stackoverflow.com/a/42467121
<p>You can commit the change in <code>feature-x</code> and <a href="https://git-scm.com/docs/git-cherry-pick" rel="noreferrer">cherry-pick</a> it in <code>hotfix</code>, as follows:</p> <pre><code># On branch feature-x git add &lt;file&gt; git commit -m "Fixed issue #562" // Note commit-id git checkout hotfix git cher...
<p>You can commit the change in <code>feature-x</code> and <a href="https://git-scm.com/docs/git-cherry-pick" rel="noreferrer">cherry-pick</a> it in <code>hotfix</code>, as follows:</p> <pre><code># On branch feature-x git add &lt;file&gt; git commit -m "Fixed issue #562" // Note commit-id git checkout hotfix git cher...
119, 456, 76220
git, git-branch, version-control
<h1>Commit a single file to another branch</h1> <p>I'm on branch <code>feature-x</code> doing some work, when I suddenly encounter an issue which should really be solved on another branch, <code>hotfix</code>.</p> <p>I want to create a commit with that change, but on the <code>hotfix</code> branch.</p> <p>From <a hre...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
22,479
git
# Commit a single file to another branch I'm on branch `feature-x` doing some work, when I suddenly encounter an issue which should really be solved on another branch, `hotfix`. I want to create a commit with that change, but on the `hotfix` branch. From [this question](https://stackoverflow.com/questions/2944469/ho...
You can commit the change in `feature-x` and [cherry-pick](https://git-scm.com/docs/git-cherry-pick) it in `hotfix`, as follows: ``` # On branch feature-x git add <file> git commit -m "Fixed issue #562" // Note commit-id git checkout hotfix git cherry-pick <commit-id> git push origin hotfix ``` Extending the answer a...
1593620
How to make part of an existing Git repository a submodule
31
2009-10-20 10:10:24
<p>I have this Git repository which contains two folders: <code>binary-search</code> and <code>poker</code>.</p> <p>For example: <a href="https://github.com/soulnafein/code-katas" rel="nofollow noreferrer">https://github.com/soulnafein/code-katas</a></p> <p>I would like to turn these folders into submodules and keep ...
17,376
144,345
2020-05-01 11:46:54
1,593,779
13
2009-10-20 10:46:27
6,309
2012-04-05 20:49:05
https://stackoverflow.com/q/1593620
https://stackoverflow.com/a/1593779
<p>The general idea is to use '<a href="http://schacon.github.com/git/git-filter-branch.html" rel="nofollow noreferrer">git filter-branch'</a> and the following steps:</p> <p>1) Create a submodule using --subdirectory-filter of <code>filter-branch</code> (after cloning your repo). </p> <pre><code>$ git filter-branch...
<p>The general idea is to use '<a href="http://schacon.github.com/git/git-filter-branch.html" rel="nofollow noreferrer">git filter-branch'</a> and the following steps:</p> <p>1) Create a submodule using --subdirectory-filter of <code>filter-branch</code> (after cloning your repo). </p> <pre><code>$ git filter-branch...
119, 41612
git, git-submodules
<h1>How to make part of an existing Git repository a submodule</h1> <p>I have this Git repository which contains two folders: <code>binary-search</code> and <code>poker</code>.</p> <p>For example: <a href="https://github.com/soulnafein/code-katas" rel="nofollow noreferrer">https://github.com/soulnafein/code-katas</a><...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
22,480
git
# How to make part of an existing Git repository a submodule I have this Git repository which contains two folders: `binary-search` and `poker`. For example: <https://github.com/soulnafein/code-katas> I would like to turn these folders into submodules and keep their change history. How can I do that?
The general idea is to use '[git filter-branch'](http://schacon.github.com/git/git-filter-branch.html) and the following steps: 1) Create a submodule using --subdirectory-filter of `filter-branch` (after cloning your repo). ``` $ git filter-branch --subdirectory-filter ABC HEAD -- --all ``` See this [SO question](ht...
11318738
Managing 3rd party sources and binaries used by code under source control
30
2012-07-03 20:32:00
<p>I have a large code base under source control (was subversion, now git). To compile the code and run the tests I use a set of 3rd party libraries. These libraries can be divided into few categoriesL</p> <ul> <li>Binaries only</li> <li>3rd party sources</li> <li>3rd party sources + local modifications</li> </ul> <p...
10,843
933,703
2012-07-13 07:37:26
11,466,111
13
2012-07-13 07:36:49
933,703
2012-07-13 07:36:49
https://stackoverflow.com/q/11318738
https://stackoverflow.com/a/11466111
<p>A fair solution for my problem is <a href="https://github.com/apenwarr/git-subtree/">git-subtree</a> which was recently merged into mainline git. It provides a fair balance between my requirements and the platform limitations. Now I have multiple repositories for the externals (each has a vendor branch as well as lo...
<p>A fair solution for my problem is <a href="https://github.com/apenwarr/git-subtree/">git-subtree</a> which was recently merged into mainline git. It provides a fair balance between my requirements and the platform limitations. Now I have multiple repositories for the externals (each has a vendor branch as well as lo...
119, 41612, 68200
git, git-submodules, git-subtree
<h1>Managing 3rd party sources and binaries used by code under source control</h1> <p>I have a large code base under source control (was subversion, now git). To compile the code and run the tests I use a set of 3rd party libraries. These libraries can be divided into few categoriesL</p> <ul> <li>Binaries only</li> <l...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
22,481
git
# Managing 3rd party sources and binaries used by code under source control I have a large code base under source control (was subversion, now git). To compile the code and run the tests I use a set of 3rd party libraries. These libraries can be divided into few categoriesL - Binaries only - 3rd party sources - 3rd p...
A fair solution for my problem is [git-subtree](https://github.com/apenwarr/git-subtree/) which was recently merged into mainline git. It provides a fair balance between my requirements and the platform limitations. Now I have multiple repositories for the externals (each has a vendor branch as well as local changes br...
35010953
How to automatically generate commit message
29
2016-01-26 09:50:08
<p>In some (very) rare occasions, I make some changes in my repository that are so self-explanatory that a commit message describing my intentions is somewhat useless. In these cases, I would like the commit message to basically just list what files I've added/removed/edited. For instance:</p> <blockquote> <p>Added ...
31,580
2,583,765
2024-12-06 10:40:10
35,027,514
13
2016-01-27 01:58:58
395,202
2017-08-19 10:26:38
https://stackoverflow.com/q/35010953
https://stackoverflow.com/a/35027514
<p>If you are really that lazy you may just use the following. In brief, it does a <code>git status</code>, extract lines for <code>new files</code>, <code>deleted</code>, <code>renamed</code> and <code>modified</code>, and pass it to <code>git commit</code></p> <pre><code># LANG=C.UTF-8 or any UTF-8 English locale s...
<p>If you are really that lazy you may just use the following. In brief, it does a <code>git status</code>, extract lines for <code>new files</code>, <code>deleted</code>, <code>renamed</code> and <code>modified</code>, and pass it to <code>git commit</code></p> <pre><code># LANG=C.UTF-8 or any UTF-8 English locale s...
119, 5597
commit, git
<h1>How to automatically generate commit message</h1> <p>In some (very) rare occasions, I make some changes in my repository that are so self-explanatory that a commit message describing my intentions is somewhat useless. In these cases, I would like the commit message to basically just list what files I've added/remov...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
22,482
git
# How to automatically generate commit message In some (very) rare occasions, I make some changes in my repository that are so self-explanatory that a commit message describing my intentions is somewhat useless. In these cases, I would like the commit message to basically just list what files I've added/removed/edited...
If you are really that lazy you may just use the following. In brief, it does a `git status`, extract lines for `new files`, `deleted`, `renamed` and `modified`, and pass it to `git commit` ``` # LANG=C.UTF-8 or any UTF-8 English locale supported by your OS may be used LANG=C git -c color.status=false status \ | sed -...
28291909
GitPython and SSH Keys?
29
2015-02-03 05:24:10
<p>How can I use GitPython along with specific SSH Keys?</p> <p>The documentation isn't very thorough on that subject. The only thing I've tried so far is <code>Repo(path)</code>.</p>
42,683
858,565
2022-10-05 17:24:15
28,292,493
13
2015-02-03 06:12:58
651,368
2015-02-04 06:50:53
https://stackoverflow.com/q/28291909
https://stackoverflow.com/a/28292493
<p>Please note that all of the following will only work in GitPython v0.3.6 or newer.</p> <p>You can use the <code>GIT_SSH</code> environment variable to provide an executable to git which will call <code>ssh</code> in its place. That way, you can use any kind of ssh key whenever git tries to connect.</p> <p>This wor...
<p>Please note that all of the following will only work in GitPython v0.3.6 or newer.</p> <p>You can use the <code>GIT_SSH</code> environment variable to provide an executable to git which will call <code>ssh</code> in its place. That way, you can use any kind of ssh key whenever git tries to connect.</p> <p>This wor...
16, 119, 25308, 61013
git, gitpython, python, ssh-keys
<h1>GitPython and SSH Keys?</h1> <p>How can I use GitPython along with specific SSH Keys?</p> <p>The documentation isn't very thorough on that subject. The only thing I've tried so far is <code>Repo(path)</code>.</p>
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
22,483
git
# GitPython and SSH Keys? How can I use GitPython along with specific SSH Keys? The documentation isn't very thorough on that subject. The only thing I've tried so far is `Repo(path)`.
Please note that all of the following will only work in GitPython v0.3.6 or newer. You can use the `GIT_SSH` environment variable to provide an executable to git which will call `ssh` in its place. That way, you can use any kind of ssh key whenever git tries to connect. This works either per call using a [context man...
23832812
change a git commit already pushed
29
2014-05-23 15:13:00
<p>I accidently overwrote another developper's changes when doing a merge in git. I know how to <a href="https://stackoverflow.com/questions/927358/how-to-undo-the-last-git-commit">undo the last commit</a>, that is, my merge.</p> <p>My problem is that I already pushed those commits into our online repository. So if I ...
33,753
1,327,651
2014-05-23 15:26:46
23,833,086
13
2014-05-23 15:26:46
216,074
2014-05-23 15:26:46
https://stackoverflow.com/q/23832812
https://stackoverflow.com/a/23833086
<p>By default, remote servers will disallow overwriting already pushed commits. This is because those new commits are different objects which are incompatible to those published before. This means that anyone who has already fetched from the remote since will have major problems fixing it once you overwrite the commit....
<p>By default, remote servers will disallow overwriting already pushed commits. This is because those new commits are different objects which are incompatible to those published before. This means that anyone who has already fetched from the remote since will have major problems fixing it once you overwrite the commit....
119
git
<h1>change a git commit already pushed</h1> <p>I accidently overwrote another developper's changes when doing a merge in git. I know how to <a href="https://stackoverflow.com/questions/927358/how-to-undo-the-last-git-commit">undo the last commit</a>, that is, my merge.</p> <p>My problem is that I already pushed those ...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
22,484
git
# change a git commit already pushed I accidently overwrote another developper's changes when doing a merge in git. I know how to [undo the last commit](https://stackoverflow.com/questions/927358/how-to-undo-the-last-git-commit), that is, my merge. My problem is that I already pushed those commits into our online rep...
By default, remote servers will disallow overwriting already pushed commits. This is because those new commits are different objects which are incompatible to those published before. This means that anyone who has already fetched from the remote since will have major problems fixing it once you overwrite the commit. So...
5212957
How to change git commit message without changing commit hash
27
2011-03-06 19:53:33
<p>The title is not exact, but I can't express it better in a single line.</p> <ul> <li>I actually know how to change git commit message like <a href="http://schacon.github.com/history.html" rel="noreferrer">here</a>.</li> <li>But I know it always changes the SHA-1 too, which I want to avoid.</li> </ul> <p>I only want ...
21,822
581,205
2021-06-18 13:17:22
5,216,440
13
2011-03-07 06:10:18
223,092
2011-03-07 06:10:18
https://stackoverflow.com/q/5212957
https://stackoverflow.com/a/5216440
<p>As various people have pointed out (e.g. in <a href="https://stackoverflow.com/questions/5212957/how-to-change-git-commit-message-without-changing-commit-hash/5213110#5213110">VonC's very useful answer</a>), <code>git notes</code> really is the mechanism you're looking for. Is it not enough for you to change your a...
<p>As various people have pointed out (e.g. in <a href="https://stackoverflow.com/questions/5212957/how-to-change-git-commit-message-without-changing-commit-hash/5213110#5213110">VonC's very useful answer</a>), <code>git notes</code> really is the mechanism you're looking for. Is it not enough for you to change your a...
119, 1318
git, history
<h1>How to change git commit message without changing commit hash</h1> <p>The title is not exact, but I can't express it better in a single line.</p> <ul> <li>I actually know how to change git commit message like <a href="http://schacon.github.com/history.html" rel="noreferrer">here</a>.</li> <li>But I know it always c...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
22,486
git
# How to change git commit message without changing commit hash The title is not exact, but I can't express it better in a single line. - I actually know how to change git commit message like [here](http://schacon.github.com/history.html). - But I know it always changes the SHA-1 too, which I want to avoid. I only w...
As various people have pointed out (e.g. in [VonC's very useful answer](https://stackoverflow.com/questions/5212957/how-to-change-git-commit-message-without-changing-commit-hash/5213110#5213110)), `git notes` really is the mechanism you're looking for. Is it not enough for you to change your alias to the following? ``...
11747691
Where is my git alias stored?
26
2012-07-31 19:36:04
<p>I have an alias that I cannot find. Typing <code>git help subaddvim</code> gives me:</p> <pre><code>`git subaddvim' is aliased to `log HEAD' </code></pre> <p>I think I defined it like this:</p> <pre><code>git config --local alias.subaddvim 'log HEAD' </code></pre> <p>I looked in <code>$repo_path/.gitconfig</code...
18,110
79,125
2012-08-10 14:50:33
11,747,692
13
2012-07-31 19:36:04
79,125
2012-07-31 19:36:04
https://stackoverflow.com/q/11747691
https://stackoverflow.com/a/11747692
<p>There is no difference between using the undocumented (or is it obsolete) <code>--local</code> flag and no flag. Git never looks for a gitconfig in your repository root (<code>$repo_path/.gitconfig</code>). Repo-local config changes are in <code>.git/config</code>.</p> <p><code>git help config</code> explains the v...
<p>There is no difference between using the undocumented (or is it obsolete) <code>--local</code> flag and no flag. Git never looks for a gitconfig in your repository root (<code>$repo_path/.gitconfig</code>). Repo-local config changes are in <code>.git/config</code>.</p> <p><code>git help config</code> explains the v...
119, 1448
alias, git
<h1>Where is my git alias stored?</h1> <p>I have an alias that I cannot find. Typing <code>git help subaddvim</code> gives me:</p> <pre><code>`git subaddvim' is aliased to `log HEAD' </code></pre> <p>I think I defined it like this:</p> <pre><code>git config --local alias.subaddvim 'log HEAD' </code></pre> <p>I look...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
22,489
git
# Where is my git alias stored? I have an alias that I cannot find. Typing `git help subaddvim` gives me: ``` `git subaddvim' is aliased to `log HEAD' ``` I think I defined it like this: ``` git config --local alias.subaddvim 'log HEAD' ``` I looked in `$repo_path/.gitconfig`, `~/.gitconfig`, `/etc/gitconfig`, but...
There is no difference between using the undocumented (or is it obsolete) `--local` flag and no flag. Git never looks for a gitconfig in your repository root (`$repo_path/.gitconfig`). Repo-local config changes are in `.git/config`. `git help config` explains the valid options: --global For writing options: write to ...
7500741
Can git submodule update be made to fetch tags in submodules?
26
2011-09-21 13:40:05
<p>I have a git repository which uses a submodule which I'd like to point at an annotated tag, but when I do <code>git submodule update</code> new tags don't get fetched. I can get new tags in the submodule by cd-ing into the submodule and doing a <code>git fetch --tags</code> there, but I'd really like to do all of th...
17,521
517,418
2012-09-05 15:18:42
7,510,508
13
2011-09-22 06:32:39
223,092
2011-09-22 06:32:39
https://stackoverflow.com/q/7500741
https://stackoverflow.com/a/7510508
<p><code>git submodule</code> is implemented as a shell script, so it's easy to see what it's doing — it might be at <code>/usr/lib/git-core/git-submodule</code> if you're using a packaged version. Essentially it just runs <code>git-fetch</code> in the submodule if it the object name (SHA1sum) stored in the main proj...
<p><code>git submodule</code> is implemented as a shell script, so it's easy to see what it's doing — it might be at <code>/usr/lib/git-core/git-submodule</code> if you're using a packaged version. Essentially it just runs <code>git-fetch</code> in the submodule if it the object name (SHA1sum) stored in the main proj...
119, 41612, 60718
git, git-submodules, git-tag
<h1>Can git submodule update be made to fetch tags in submodules?</h1> <p>I have a git repository which uses a submodule which I'd like to point at an annotated tag, but when I do <code>git submodule update</code> new tags don't get fetched. I can get new tags in the submodule by cd-ing into the submodule and doing a <...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
22,490
git
# Can git submodule update be made to fetch tags in submodules? I have a git repository which uses a submodule which I'd like to point at an annotated tag, but when I do `git submodule update` new tags don't get fetched. I can get new tags in the submodule by cd-ing into the submodule and doing a `git fetch --tags` th...
`git submodule` is implemented as a shell script, so it's easy to see what it's doing — it might be at `/usr/lib/git-core/git-submodule` if you're using a packaged version. Essentially it just runs `git-fetch` in the submodule if it the object name (SHA1sum) stored in the main project's tree doesn't match the version c...
2326172
Delphi RES files and Git
26
2010-02-24 13:12:12
<p>I have a big project written in Delphi and I want to manage its sources using Git. I created Git repository, which includes my application's sources and 3rd party components. All that stuff is automatically building using <code>msbuild</code>.</p> <p>The biggest problem is RES files. Some of them are updated every ...
6,260
212,110
2024-08-10 13:26:11
2,326,292
13
2010-02-24 13:28:05
28,445
2010-02-24 13:28:05
https://stackoverflow.com/q/2326172
https://stackoverflow.com/a/2326292
<p>I keep my project RES files in git (those that match the name of the dpr).</p> <p>I believe the only reason the project RES file would change every time you build is if you have increment build number set, which to me either means you need to keep the res in source control or you don't care about the build number s...
<p>I keep my project RES files in git (those that match the name of the dpr).</p> <p>I believe the only reason the project RES file would change every time you build is if you have increment build number set, which to me either means you need to keep the res in source control or you don't care about the build number s...
118, 119, 852
delphi, git, resources
<h1>Delphi RES files and Git</h1> <p>I have a big project written in Delphi and I want to manage its sources using Git. I created Git repository, which includes my application's sources and 3rd party components. All that stuff is automatically building using <code>msbuild</code>.</p> <p>The biggest problem is RES file...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
22,491
git
# Delphi RES files and Git I have a big project written in Delphi and I want to manage its sources using Git. I created Git repository, which includes my application's sources and 3rd party components. All that stuff is automatically building using `msbuild`. The biggest problem is RES files. Some of them are updated...
I keep my project RES files in git (those that match the name of the dpr). I believe the only reason the project RES file would change every time you build is if you have increment build number set, which to me either means you need to keep the res in source control or you don't care about the build number so you shou...
14194232
Using gitk to view the full history of a moved file
25
2013-01-07 10:40:42
<p>After much searching, I have not found a satisfactory method that is easy to use to view the complete history of a moved file in Git and more importantly in Gitk. Using <code>git log --follow [filePath]</code> and even <code>gitk --follow [filePath]</code> gives you the commits that the file was involved in but will...
4,686
1,954,696
2019-11-02 09:13:18
14,251,168
13
2013-01-10 05:07:33
1,965,396
2013-01-10 05:07:33
https://stackoverflow.com/q/14194232
https://stackoverflow.com/a/14251168
<p>If you want to see the changes that was made in each commit even the file has been renamed, you can use the option <code>-p</code> of <code>git log</code>:</p> <pre><code>git log -p --follow [file/with/path] </code></pre>
<p>If you want to see the changes that was made in each commit even the file has been renamed, you can use the option <code>-p</code> of <code>git log</code>:</p> <pre><code>git log -p --follow [file/with/path] </code></pre>
119, 5634, 30785
git, gitk, move
<h1>Using gitk to view the full history of a moved file</h1> <p>After much searching, I have not found a satisfactory method that is easy to use to view the complete history of a moved file in Git and more importantly in Gitk. Using <code>git log --follow [filePath]</code> and even <code>gitk --follow [filePath]</code>...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
22,492
git
# Using gitk to view the full history of a moved file After much searching, I have not found a satisfactory method that is easy to use to view the complete history of a moved file in Git and more importantly in Gitk. Using `git log --follow [filePath]` and even `gitk --follow [filePath]` gives you the commits that the...
If you want to see the changes that was made in each commit even the file has been renamed, you can use the option `-p` of `git log`: ``` git log -p --follow [file/with/path] ```
3964368
GIT pull/fetch from specific tag
25
2010-10-18 23:47:34
<p>Is there a way to pull/fetch code from a specific tag in a repo.</p> <p>Am aware that after clone, i can checkout to the tag but is it possible to specify a tag during a pull?</p> <p>In ClearCase i can rebase or deliver a specific baseline of code, is there a way where i can use git tags similarly to pull/push cod...
47,763
289,715
2022-01-21 05:11:29
3,965,272
13
2010-10-19 04:12:15
6,309
2021-09-30 21:38:39
https://stackoverflow.com/q/3964368
https://stackoverflow.com/a/3965272
<p>It will be a bit different with ClearCase, because you can only rebase a baseline produced on the parent Stream (although you can deliver any baseline from any Stream to your Stream).<br /> So there are some limitations to the kind of merge you do with ClearCase.</p> <p>With Git, you can merge any commit to the <cod...
<p>It will be a bit different with ClearCase, because you can only rebase a baseline produced on the parent Stream (although you can deliver any baseline from any Stream to your Stream).<br /> So there are some limitations to the kind of merge you do with ClearCase.</p> <p>With Git, you can merge any commit to the <cod...
119, 28896, 33720
git, git-fetch, git-pull
<h1>GIT pull/fetch from specific tag</h1> <p>Is there a way to pull/fetch code from a specific tag in a repo.</p> <p>Am aware that after clone, i can checkout to the tag but is it possible to specify a tag during a pull?</p> <p>In ClearCase i can rebase or deliver a specific baseline of code, is there a way where i c...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
22,493
git
# GIT pull/fetch from specific tag Is there a way to pull/fetch code from a specific tag in a repo. Am aware that after clone, i can checkout to the tag but is it possible to specify a tag during a pull? In ClearCase i can rebase or deliver a specific baseline of code, is there a way where i can use git tags similar...
It will be a bit different with ClearCase, because you can only rebase a baseline produced on the parent Stream (although you can deliver any baseline from any Stream to your Stream). So there are some limitations to the kind of merge you do with ClearCase. With Git, you can merge any commit to the `HEAD` of your cu...
35172734
Git reset current rebase
24
2016-02-03 09:12:54
<p>I've been doing a rebase. I've worked on fixing some conflicts but I've ended up going in the wrong direction and now I just want to start again fixing these conflicts.</p> <p>I'd like to reset the rebase, so that I'm still rebasing the current commit but the working copy has been reset to when the commit was flagg...
22,219
298,661
2024-03-14 19:52:16
35,174,113
13
2016-02-03 10:14:10
1,288,760
2016-02-03 10:31:18
https://stackoverflow.com/q/35172734
https://stackoverflow.com/a/35174113
<p>If you just want to redo a merge for a specific file, all you need to do is:</p> <pre><code>git checkout -m &lt;file&gt; </code></pre> <p>If you want to redo the whole commit, here's how I do it (there's probably a better way of doing this):</p> <ol> <li>There's a conflict during the rebase</li> <li>I mess up the...
<p>If you just want to redo a merge for a specific file, all you need to do is:</p> <pre><code>git checkout -m &lt;file&gt; </code></pre> <p>If you want to redo the whole commit, here's how I do it (there's probably a better way of doing this):</p> <ol> <li>There's a conflict during the rebase</li> <li>I mess up the...
119, 8974
git, rebase
<h1>Git reset current rebase</h1> <p>I've been doing a rebase. I've worked on fixing some conflicts but I've ended up going in the wrong direction and now I just want to start again fixing these conflicts.</p> <p>I'd like to reset the rebase, so that I'm still rebasing the current commit but the working copy has been ...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
22,494
git
# Git reset current rebase I've been doing a rebase. I've worked on fixing some conflicts but I've ended up going in the wrong direction and now I just want to start again fixing these conflicts. I'd like to reset the rebase, so that I'm still rebasing the current commit but the working copy has been reset to when th...
If you just want to redo a merge for a specific file, all you need to do is: ``` git checkout -m <file> ``` If you want to redo the whole commit, here's how I do it (there's probably a better way of doing this): 1. There's a conflict during the rebase 2. I mess up the conflict resolution 3. I run a `git status` whic...
15631890
How to achieve `git --no-ff --ff-only` which is not allowed
24
2013-03-26 07:49:05
<p>As part our rebase-heavy workflow, I am hoping to use a merge on the master branch. In particular I want to merge only when the topic branch has been rebased onto the most recent master commit thereby making any merge a fast-forward one. I can achieve that by using:</p> <p><code>git merge --ff-only</code></p> <p>F...
4,909
607,562
2017-03-10 12:04:36
15,653,390
13
2013-03-27 07:02:52
19,563
2013-03-27 07:02:52
https://stackoverflow.com/q/15631890
https://stackoverflow.com/a/15653390
<p>You don't want <code>--ff-only</code> because you do want to make a merge commit which <code>--ff-only</code> would inhibit.</p> <p>The check that you want can be made as a separate check before running the merge command. You could package this into a simple shell function.</p> <p>E.g.</p> <pre class="lang-sh pre...
<p>You don't want <code>--ff-only</code> because you do want to make a merge commit which <code>--ff-only</code> would inhibit.</p> <p>The check that you want can be made as a separate check before running the merge command. You could package this into a simple shell function.</p> <p>E.g.</p> <pre class="lang-sh pre...
119, 717, 8974
git, merge, rebase
<h1>How to achieve `git --no-ff --ff-only` which is not allowed</h1> <p>As part our rebase-heavy workflow, I am hoping to use a merge on the master branch. In particular I want to merge only when the topic branch has been rebased onto the most recent master commit thereby making any merge a fast-forward one. I can achi...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
22,495
git
# How to achieve `git --no-ff --ff-only` which is not allowed As part our rebase-heavy workflow, I am hoping to use a merge on the master branch. In particular I want to merge only when the topic branch has been rebased onto the most recent master commit thereby making any merge a fast-forward one. I can achieve that ...
You don't want `--ff-only` because you do want to make a merge commit which `--ff-only` would inhibit. The check that you want can be made as a separate check before running the merge command. You could package this into a simple shell function. E.g. ``` merge_if_ahead () { if test "$(git merge-base HEAD "$1")" = ...
8753014
How to setup Github SSH key on second computer
24
2012-01-06 03:26:05
<p>I've got a Github account setup on one computer. I would like to also access my Github account on a second machine using the same SSH key I used for the first computer. How do I import the SSH private key into the new computers user profile?</p> <pre><code>cp ~/other_comp_github_key ~/.ssh/github </code></pre> <p>...
34,327
136,584
2022-08-10 22:09:01
8,753,058
13
2012-01-06 03:34:04
377,270
2012-01-06 03:34:04
https://stackoverflow.com/q/8753014
https://stackoverflow.com/a/8753058
<p>It'd be best to create a new private key if github allows you to have several associated with your account. (Sharing private keys among machines is very much like sharing passwords on multiple accounts.) But not all services allow multiple keys, so...</p> <p>You don't specify that you copied the private portion of ...
<p>It'd be best to create a new private key if github allows you to have several associated with your account. (Sharing private keys among machines is very much like sharing passwords on multiple accounts.) But not all services allow multiple keys, so...</p> <p>You don't specify that you copied the private portion of ...
64, 119, 386
git, ssh, windows
<h1>How to setup Github SSH key on second computer</h1> <p>I've got a Github account setup on one computer. I would like to also access my Github account on a second machine using the same SSH key I used for the first computer. How do I import the SSH private key into the new computers user profile?</p> <pre><code>cp ...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
22,496
git
# How to setup Github SSH key on second computer I've got a Github account setup on one computer. I would like to also access my Github account on a second machine using the same SSH key I used for the first computer. How do I import the SSH private key into the new computers user profile? ``` cp ~/other_comp_github_...
It'd be best to create a new private key if github allows you to have several associated with your account. (Sharing private keys among machines is very much like sharing passwords on multiple accounts.) But not all services allow multiple keys, so... You don't specify that you copied the private portion of the key; m...
1677049
How do I get my git merge conflicts back after merging incorrectly?
24
2009-11-04 22:14:21
<p>I'm trying to merge 2 branches that have a lot of changes in them, several with merge conflicts. I merged the files using <code>git mergetool</code>, but I've subsequently realized that I merged a couple of them incorrectly. I basically want to go back to the conflicted state for those couple files, so I can re-ru...
6,632
136,325
2014-06-17 18:38:01
1,689,871
13
2009-11-06 19:40:03
46,058
2009-11-06 19:40:03
https://stackoverflow.com/q/1677049
https://stackoverflow.com/a/1689871
<p>First, check out if you have conflicted state in the index (<em>before resetting to HEAD</em>), via </p> <pre><code>$ git ls-files --stage --abbrev my_file </code></pre> <p>You should get something like the following:</p> <pre><code>100644 257cc56 1 my_file 100644 b7d6715 2 my_file 100644 5716ca5 ...
<p>First, check out if you have conflicted state in the index (<em>before resetting to HEAD</em>), via </p> <pre><code>$ git ls-files --stage --abbrev my_file </code></pre> <p>You should get something like the following:</p> <pre><code>100644 257cc56 1 my_file 100644 b7d6715 2 my_file 100644 5716ca5 ...
119, 717
git, merge
<h1>How do I get my git merge conflicts back after merging incorrectly?</h1> <p>I'm trying to merge 2 branches that have a lot of changes in them, several with merge conflicts. I merged the files using <code>git mergetool</code>, but I've subsequently realized that I merged a couple of them incorrectly. I basically w...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
22,497
git
# How do I get my git merge conflicts back after merging incorrectly? I'm trying to merge 2 branches that have a lot of changes in them, several with merge conflicts. I merged the files using `git mergetool`, but I've subsequently realized that I merged a couple of them incorrectly. I basically want to go back to the ...
First, check out if you have conflicted state in the index (*before resetting to HEAD*), via ``` $ git ls-files --stage --abbrev my_file ``` You should get something like the following: ``` 100644 257cc56 1 my_file 100644 b7d6715 2 my_file 100644 5716ca5 3 my_file ``` If you don't get that, y...
43317872
Understanding .git/config's 'remote' and 'branch' sections
23
2017-04-10 08:09:28
<p>Here's the contents of the <code>remote</code> and <code>branch</code> sections of my <code>.git/config</code> file.</p> <blockquote> <pre><code>[remote "origin"] url = https://EvanAad@bitbucket.org/EvanAad/bitbucketstationlocations.git fetch = +refs/heads/*:refs/remotes/origin/* [branch "master"] ...
12,745
1,818,935
2020-06-28 15:46:00
43,318,281
13
2017-04-10 08:31:15
1,755,598
2017-11-17 17:31:59
https://stackoverflow.com/q/43317872
https://stackoverflow.com/a/43318281
<p>Its called refspec. Its the mechmism that git is using to &quot;talk&quot; to the remote server and to map local branches to remote branches.</p> <h3>Refspecs</h3> <p><strong>A refspec maps a branch in the local repository to a branch in a remote repository.</strong><br /> This makes it possible to manage remote bra...
<p>Its called refspec. Its the mechmism that git is using to &quot;talk&quot; to the remote server and to map local branches to remote branches.</p> <h3>Refspecs</h3> <p><strong>A refspec maps a branch in the local repository to a branch in a remote repository.</strong><br /> This makes it possible to manage remote bra...
119, 28897, 32868, 33720, 41346
git, git-config, git-fetch, git-merge, git-remote
<h1>Understanding .git/config's 'remote' and 'branch' sections</h1> <p>Here's the contents of the <code>remote</code> and <code>branch</code> sections of my <code>.git/config</code> file.</p> <blockquote> <pre><code>[remote "origin"] url = https://EvanAad@bitbucket.org/EvanAad/bitbucketstationlocations.git ...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
22,498
git
# Understanding .git/config's 'remote' and 'branch' sections Here's the contents of the `remote` and `branch` sections of my `.git/config` file. > ``` > [remote "origin"] > url = https://EvanAad@bitbucket.org/EvanAad/bitbucketstationlocations.git > fetch = +refs/heads/*:refs/remotes/origin/* > [branch "...
Its called refspec. Its the mechmism that git is using to "talk" to the remote server and to map local branches to remote branches. ### Refspecs **A refspec maps a branch in the local repository to a branch in a remote repository.** This makes it possible to manage remote branches using local Git commands and to co...
42073591
How to pull remote branch in source tree
23
2017-02-06 17:19:37
<p>I have repo in bitbucket. it has 2 branches master and Branch9_Artiflex but when I clone this repo to my local repo via source tree (clone-clone in source tree) i'm able to see only master branch.</p> <p>Create new branch Branch9_Artiflex on my local machine and pull all data from remote Branch9_Artiflex doesn't wor...
80,038
5,526,080
2021-06-01 05:58:36
42,083,182
13
2017-02-07 06:30:06
5,715,934
2017-02-07 06:30:06
https://stackoverflow.com/q/42073591
https://stackoverflow.com/a/42083182
<p>Try</p> <ul> <li><code>git fetch</code> . This would fetch any missed remote branch to local repository (assuming there's no other problem). </li> <li><code>git checkout Branch9_Artiflex</code>. Now you will be switched into a local/Branch9_Artiflex which is newly created with the latest changes of origin/Branch9_A...
<p>Try</p> <ul> <li><code>git fetch</code> . This would fetch any missed remote branch to local repository (assuming there's no other problem). </li> <li><code>git checkout Branch9_Artiflex</code>. Now you will be switched into a local/Branch9_Artiflex which is newly created with the latest changes of origin/Branch9_A...
119, 8337, 90056
atlassian-sourcetree, bitbucket, git
<h1>How to pull remote branch in source tree</h1> <p>I have repo in bitbucket. it has 2 branches master and Branch9_Artiflex but when I clone this repo to my local repo via source tree (clone-clone in source tree) i'm able to see only master branch.</p> <p>Create new branch Branch9_Artiflex on my local machine and pull...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
22,499
git
# How to pull remote branch in source tree I have repo in bitbucket. it has 2 branches master and Branch9_Artiflex but when I clone this repo to my local repo via source tree (clone-clone in source tree) i'm able to see only master branch. Create new branch Branch9_Artiflex on my local machine and pull all data from ...
Try - `git fetch` . This would fetch any missed remote branch to local repository (assuming there's no other problem). - `git checkout Branch9_Artiflex`. Now you will be switched into a local/Branch9_Artiflex which is newly created with the latest changes of origin/Branch9_Artiflex. :))
32609195
git - Tags with the same name with a branch
23
2015-09-16 12:54:01
<p>I was kind of freaking out why on earth <code>git diff branch1 branch2</code> is showing irrelevant things (it was like it's comparing branch1 with an OLDER version of branch2)</p> <p>Until I found out we have some tags with the same name with a branch!</p> <p>Other than diff, that makes problems on pull/push (amb...
34,647
495,838
2025-01-02 16:42:12
32,609,196
13
2015-09-16 12:54:01
495,838
2015-09-16 12:54:01
https://stackoverflow.com/q/32609195
https://stackoverflow.com/a/32609196
<p>First, we extract all the tags:</p> <pre><code>git tag | sort &gt; tags </code></pre> <p>And branches, if you want to check this with local branches:</p> <pre><code>git branch | sed -e 's/^[ \t]*//' | sort &gt; branches </code></pre> <p>Or branches of a specific remote, like <code>origin</code></p> <pre><code>g...
<p>First, we extract all the tags:</p> <pre><code>git tag | sort &gt; tags </code></pre> <p>And branches, if you want to check this with local branches:</p> <pre><code>git branch | sed -e 's/^[ \t]*//' | sort &gt; branches </code></pre> <p>Or branches of a specific remote, like <code>origin</code></p> <pre><code>g...
115, 119, 1879
branch, git, tags
<h1>git - Tags with the same name with a branch</h1> <p>I was kind of freaking out why on earth <code>git diff branch1 branch2</code> is showing irrelevant things (it was like it's comparing branch1 with an OLDER version of branch2)</p> <p>Until I found out we have some tags with the same name with a branch!</p> <p>O...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
22,500
git
# git - Tags with the same name with a branch I was kind of freaking out why on earth `git diff branch1 branch2` is showing irrelevant things (it was like it's comparing branch1 with an OLDER version of branch2) Until I found out we have some tags with the same name with a branch! Other than diff, that makes problem...
First, we extract all the tags: ``` git tag | sort > tags ``` And branches, if you want to check this with local branches: ``` git branch | sed -e 's/^[ \t]*//' | sort > branches ``` Or branches of a specific remote, like `origin` ``` git branch -r | grep origin/ | sed -e 's:^[ \t]*origin/::' | sort > branches ``...
21576435
Change the URL to a remote Git repository via Visual Studio 2013?
23
2014-02-05 11:48:58
<p>Is it possible to modify the URL for a remote Git repository via Visual Studio 2013 if it happens to be set incorrectly? I'm getting the "famous" (and not very helpful) error that says:</p> <blockquote> <p>"blah, blah...This transport isn't implemented. Sorry."</p> </blockquote> <p>Is it possible to make this ch...
24,304
1,847,185
2023-06-02 09:14:21
21,577,634
13
2014-02-05 12:42:37
1,603,850
2014-02-05 12:42:37
https://stackoverflow.com/q/21576435
https://stackoverflow.com/a/21577634
<p>From the command line, <code>git remote set-url remotename url</code> will do the trick. docs <a href="http://git-scm.com/docs/git-remote" rel="noreferrer">here</a></p>
<p>From the command line, <code>git remote set-url remotename url</code> will do the trick. docs <a href="http://git-scm.com/docs/git-remote" rel="noreferrer">here</a></p>
119, 365, 456, 33953, 93364
git, url, version-control, visual-studio, visual-studio-2013
<h1>Change the URL to a remote Git repository via Visual Studio 2013?</h1> <p>Is it possible to modify the URL for a remote Git repository via Visual Studio 2013 if it happens to be set incorrectly? I'm getting the "famous" (and not very helpful) error that says:</p> <blockquote> <p>"blah, blah...This transport isn'...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
22,501
git
# Change the URL to a remote Git repository via Visual Studio 2013? Is it possible to modify the URL for a remote Git repository via Visual Studio 2013 if it happens to be set incorrectly? I'm getting the "famous" (and not very helpful) error that says: > "blah, blah...This transport isn't implemented. Sorry." Is it...
From the command line, `git remote set-url remotename url` will do the trick. docs [here](http://git-scm.com/docs/git-remote)
15058844
Print branch description
23
2013-02-25 01:32:01
<p>Git supports an option to the <code>branch</code> command called <code>--edit-description</code>, which the man page states to be used by &quot;various&quot; other commands. One command (at least by default) that it is not used by is <code>git-branch</code>, when used to simply list the local branches.</p> <p>Is th...
10,777
225,002
2024-04-14 02:10:25
15,062,356
13
2013-02-25 07:53:45
6,309
2022-08-22 01:01:01
https://stackoverflow.com/q/15058844
https://stackoverflow.com/a/15062356
<p>I confirm there is no way for now to display the description of the branch with <code>git branch</code> (as opposed to <code>git config</code>, see last part of this answer below).</p> <p><a href="http://git.661346.n2.nabble.com/More-support-on-branch-description-td7204093.html" rel="nofollow noreferrer">This thread...
<p>I confirm there is no way for now to display the description of the branch with <code>git branch</code> (as opposed to <code>git config</code>, see last part of this answer below).</p> <p><a href="http://git.661346.n2.nabble.com/More-support-on-branch-description-td7204093.html" rel="nofollow noreferrer">This thread...
119, 76220
git, git-branch
<h1>Print branch description</h1> <p>Git supports an option to the <code>branch</code> command called <code>--edit-description</code>, which the man page states to be used by &quot;various&quot; other commands. One command (at least by default) that it is not used by is <code>git-branch</code>, when used to simply lis...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
22,503
git
# Print branch description Git supports an option to the `branch` command called `--edit-description`, which the man page states to be used by "various" other commands. One command (at least by default) that it is not used by is `git-branch`, when used to simply list the local branches. Is there way to get `git-branc...
I confirm there is no way for now to display the description of the branch with `git branch` (as opposed to `git config`, see last part of this answer below). [This thread](http://git.661346.n2.nabble.com/More-support-on-branch-description-td7204093.html) includes > > The coming v1.7.9 will introduce branch descripti...
49414218
Difference between tag and commit message
21
2018-03-21 18:38:02
<p>I understand one always needs a message for committing the changes but when and why do I need to also tag a commit? Let's say I made some changes and I commit using</p> <pre><code>git add -A git commit -m &quot;add feature 1&quot; </code></pre> <p>and now</p> <pre><code>git tag -a -m &quot;includes feature 1&quot; v...
13,474
6,560,462
2021-06-07 13:10:11
49,414,437
13
2018-03-21 18:50:45
8,160,553
2018-03-21 18:50:45
https://stackoverflow.com/q/49414218
https://stackoverflow.com/a/49414437
<p>It would make sense to specify a tag when you release a version of the software you're producing.</p> <p>You could then do:</p> <p><code>git tag -a v1.0 -m "Release Version 1.0"</code></p> <p>Like my comment mentioned, you do not have to tag after every commit, like you mention in your post, you can also create l...
<p>It would make sense to specify a tag when you release a version of the software you're producing.</p> <p>You could then do:</p> <p><code>git tag -a v1.0 -m "Release Version 1.0"</code></p> <p>Like my comment mentioned, you do not have to tag after every commit, like you mention in your post, you can also create l...
119, 53850, 60718
git, git-commit, git-tag
<h1>Difference between tag and commit message</h1> <p>I understand one always needs a message for committing the changes but when and why do I need to also tag a commit? Let's say I made some changes and I commit using</p> <pre><code>git add -A git commit -m &quot;add feature 1&quot; </code></pre> <p>and now</p> <pre><...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
22,506
git
# Difference between tag and commit message I understand one always needs a message for committing the changes but when and why do I need to also tag a commit? Let's say I made some changes and I commit using ``` git add -A git commit -m "add feature 1" ``` and now ``` git tag -a -m "includes feature 1" v0.1 ``` T...
It would make sense to specify a tag when you release a version of the software you're producing. You could then do: `git tag -a v1.0 -m "Release Version 1.0"` Like my comment mentioned, you do not have to tag after every commit, like you mention in your post, you can also create lightweight tags, if you don't want ...
20377294
git-diff: not taking line order into account
21
2013-12-04 13:58:23
<p>I have a file in my repository that is generated by a software program.</p> <p>This program sometimes reorder the lines on that file, which is not really important because line order doesn't matter. The problem is that when performing git-diff it's very difficult to see whether anything has actually changed or not....
3,112
1,970,845
2017-02-25 05:50:42
20,379,403
13
2013-12-04 15:31:41
1,970,845
2017-02-25 05:50:42
https://stackoverflow.com/q/20377294
https://stackoverflow.com/a/20379403
<p>At the end of the day, I'm manually running this command before committing to know whether the file actually changed or it's just a line reorder. Maybe I'll set up a git hook for it.</p> <pre><code>diff -wB &lt;(sort file.txt) &lt;(git show HEAD:file.txt | sort -) </code></pre> <p>This command compares the file in...
<p>At the end of the day, I'm manually running this command before committing to know whether the file actually changed or it's just a line reorder. Maybe I'll set up a git hook for it.</p> <pre><code>diff -wB &lt;(sort file.txt) &lt;(git show HEAD:file.txt | sort -) </code></pre> <p>This command compares the file in...
119, 9033
git, git-diff
<h1>git-diff: not taking line order into account</h1> <p>I have a file in my repository that is generated by a software program.</p> <p>This program sometimes reorder the lines on that file, which is not really important because line order doesn't matter. The problem is that when performing git-diff it's very difficul...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
22,508
git
# git-diff: not taking line order into account I have a file in my repository that is generated by a software program. This program sometimes reorder the lines on that file, which is not really important because line order doesn't matter. The problem is that when performing git-diff it's very difficult to see whether...
At the end of the day, I'm manually running this command before committing to know whether the file actually changed or it's just a line reorder. Maybe I'll set up a git hook for it. ``` diff -wB <(sort file.txt) <(git show HEAD:file.txt | sort -) ``` This command compares the file in the working directory to the fil...
12865332
Remove old commit information from a git repository to save space
21
2012-10-12 18:51:47
<p>I have a repository for storing some large binary files (tifs, jpgs, pdfs) that is growing pretty large. There is also a fair amount of files that are created, removed, and renamed and I don't care about the individual commit history. This question is somewhat simplified because I'm dealing with a repository that ha...
25,272
56,791
2019-04-03 20:24:08
12,867,189
13
2012-10-12 21:13:50
119,725
2012-10-15 21:41:11
https://stackoverflow.com/q/12865332
https://stackoverflow.com/a/12867189
<p>I think, you can shrink your history following this answer: </p> <p><a href="https://stackoverflow.com/questions/5912274/how-to-delete-a-specific-revision-of-a-github-gist/5912484#5912484">How to delete a specific revision of a github gist?</a></p> <p>Decide on which points in history, you want to keep. </p> <pre...
<p>I think, you can shrink your history following this answer: </p> <p><a href="https://stackoverflow.com/questions/5912274/how-to-delete-a-specific-revision-of-a-github-gist/5912484#5912484">How to delete a specific revision of a github gist?</a></p> <p>Decide on which points in history, you want to keep. </p> <pre...
119
git
<h1>Remove old commit information from a git repository to save space</h1> <p>I have a repository for storing some large binary files (tifs, jpgs, pdfs) that is growing pretty large. There is also a fair amount of files that are created, removed, and renamed and I don't care about the individual commit history. This qu...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
22,509
git
# Remove old commit information from a git repository to save space I have a repository for storing some large binary files (tifs, jpgs, pdfs) that is growing pretty large. There is also a fair amount of files that are created, removed, and renamed and I don't care about the individual commit history. This question is...
I think, you can shrink your history following this answer: [How to delete a specific revision of a github gist?](https://stackoverflow.com/questions/5912274/how-to-delete-a-specific-revision-of-a-github-gist/5912484#5912484) Decide on which points in history, you want to keep. ``` pick <hash1> <commit message> pick...
2318988
How do I .ignore files with Git GUI?
21
2010-02-23 14:48:25
<p>I have created a .gitignore file in the folder with the .git folder, but I still get the files I'm trying to ignore when doing a rescan of the repository.</p> <p>This is the content of the file.</p> <pre><code># Ignored files *.suo *.user bin obj *.pdb *.cache *_svn *.svn *.suo *.user *.build-res TestRe...
27,407
173,728
2016-08-24 14:54:40
2,319,036
13
2010-02-23 14:55:27
6,309
2010-02-23 14:55:27
https://stackoverflow.com/q/2318988
https://stackoverflow.com/a/2319036
<p>You need to make sure the file you are still seeing are not currently committed or staged.</p> <p>If you remove them (<code>git rm</code> or <code>git rm --cached</code>), and then add them as private file, then they will be ignored.</p>
<p>You need to make sure the file you are still seeing are not currently committed or staged.</p> <p>If you remove them (<code>git rm</code> or <code>git rm --cached</code>), and then add them as private file, then they will be ignored.</p>
119, 33729
git, git-gui
<h1>How do I .ignore files with Git GUI?</h1> <p>I have created a .gitignore file in the folder with the .git folder, but I still get the files I'm trying to ignore when doing a rescan of the repository.</p> <p>This is the content of the file.</p> <pre><code># Ignored files *.suo *.user bin obj *.pdb *.cache *_...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
22,510
git
# How do I .ignore files with Git GUI? I have created a .gitignore file in the folder with the .git folder, but I still get the files I'm trying to ignore when doing a rescan of the repository. This is the content of the file. ``` # Ignored files *.suo *.user bin obj *.pdb *.cache *_svn *.svn *.suo *.user ...
You need to make sure the file you are still seeing are not currently committed or staged. If you remove them (`git rm` or `git rm --cached`), and then add them as private file, then they will be ignored.
10717571
Trying to get svn2git working on Windows
20
2012-05-23 09:57:25
<p>I'm migrating an SVN repository over to Git. The git-svn command doesn't handle the branches and tags properly but I stumbled across a tool called svn2git which seems to resolve this (https://github.com/nirvdrum/svn2git).</p> <p>I've tried setting up this tool to work on Windows but I've not had much success. </p> ...
13,504
691,226
2019-06-10 08:23:27
10,720,370
13
2012-05-23 12:54:52
520,162
2016-04-12 10:52:44
https://stackoverflow.com/q/10717571
https://stackoverflow.com/a/10720370
<p>Obviously, <code>rubygems.rb</code> is missing. Install it as documented here:<br> <a href="https://rubygems.org/pages/download" rel="nofollow noreferrer">https://rubygems.org/pages/download</a></p> <p>Then, install <code>svn2git</code> as instructed here:<br> <a href="https://github.com/nirvdrum/svn2git" rel="nofo...
<p>Obviously, <code>rubygems.rb</code> is missing. Install it as documented here:<br> <a href="https://rubygems.org/pages/download" rel="nofollow noreferrer">https://rubygems.org/pages/download</a></p> <p>Then, install <code>svn2git</code> as instructed here:<br> <a href="https://github.com/nirvdrum/svn2git" rel="nofo...
12, 63, 119, 6452
git, git-svn, ruby, svn
<h1>Trying to get svn2git working on Windows</h1> <p>I'm migrating an SVN repository over to Git. The git-svn command doesn't handle the branches and tags properly but I stumbled across a tool called svn2git which seems to resolve this (https://github.com/nirvdrum/svn2git).</p> <p>I've tried setting up this tool to wo...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
22,512
git
# Trying to get svn2git working on Windows I'm migrating an SVN repository over to Git. The git-svn command doesn't handle the branches and tags properly but I stumbled across a tool called svn2git which seems to resolve this (https://github.com/nirvdrum/svn2git). I've tried setting up this tool to work on Windows bu...
Obviously, `rubygems.rb` is missing. Install it as documented here: <https://rubygems.org/pages/download> Then, install `svn2git` as instructed here: <https://github.com/nirvdrum/svn2git> After that, everything shall be fine.
38737765
How do I exclude files from git archive?
19
2016-08-03 08:01:21
<p>Given a simple test repository with a single commit with two files, <code>a</code> and <code>b</code>, I can get a list of specific files:</p> <pre><code>$ git ls-files a a </code></pre> <p>Or a list of all files excluding specific files:</p> <pre><code>$ git ls-files . ':!b' a </code></pre> <p>I can create an a...
16,295
null
2022-06-18 15:40:33
38,738,671
13
2016-08-03 08:44:16
720,999
2016-08-03 08:44:16
https://stackoverflow.com/q/38737765
https://stackoverflow.com/a/38738671
<p>I think you almost nailed it: attributes can be read from several places, with <code>.gitattributes</code> being only the most common of them. The second one&mdash;considered a per-repository configuration&mdash;is <code>$GIT_DIR/info/attributes</code>.</p> <p>To cite the manual:</p> <blockquote> <p>Note that a...
<p>I think you almost nailed it: attributes can be read from several places, with <code>.gitattributes</code> being only the most common of them. The second one&mdash;considered a per-repository configuration&mdash;is <code>$GIT_DIR/info/attributes</code>.</p> <p>To cite the manual:</p> <blockquote> <p>Note that a...
119, 81662
git, git-archive
<h1>How do I exclude files from git archive?</h1> <p>Given a simple test repository with a single commit with two files, <code>a</code> and <code>b</code>, I can get a list of specific files:</p> <pre><code>$ git ls-files a a </code></pre> <p>Or a list of all files excluding specific files:</p> <pre><code>$ git ls-f...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
22,516
git
# How do I exclude files from git archive? Given a simple test repository with a single commit with two files, `a` and `b`, I can get a list of specific files: ``` $ git ls-files a a ``` Or a list of all files excluding specific files: ``` $ git ls-files . ':!b' a ``` I can create an archive of specific files: ``...
I think you almost nailed it: attributes can be read from several places, with `.gitattributes` being only the most common of them. The second one—considered a per-repository configuration—is `$GIT_DIR/info/attributes`. To cite the manual: > Note that attributes are by default taken from the `.gitattributes` files in...
20101211
Disable git in Visual Studio 2013
19
2013-11-20 16:19:12
<p>I have a repository that is managed by tfs. However locally I would like to manage it via git and the push changes to tfs. Once I'm creating git repo over there VS2013 in team explorer shows this solution managed by git only. If I try to edit any file it complains that file is read only only I cannot save it in a pr...
10,916
282,585
2017-08-25 05:55:50
20,101,933
13
2013-11-20 16:51:08
736,079
2015-05-11 10:50:30
https://stackoverflow.com/q/20101211
https://stackoverflow.com/a/20101933
<p>For your scenario <a href="http://gittf.codeplex.com/" rel="noreferrer"><code>Git-tf</code></a> is probably a better solution, it will create a local git repo based on your TFVC source control folder. When you're done, you can push your changes from Git directly to TFVC from the commandline. Since you're already co...
<p>For your scenario <a href="http://gittf.codeplex.com/" rel="noreferrer"><code>Git-tf</code></a> is probably a better solution, it will create a local git repo based on your TFVC source control folder. When you're done, you can push your changes from Git directly to TFVC from the commandline. Since you're already co...
119, 733, 93364, 116537
azure-devops, git, tfs, visual-studio-2013
<h1>Disable git in Visual Studio 2013</h1> <p>I have a repository that is managed by tfs. However locally I would like to manage it via git and the push changes to tfs. Once I'm creating git repo over there VS2013 in team explorer shows this solution managed by git only. If I try to edit any file it complains that file...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
22,518
git
# Disable git in Visual Studio 2013 I have a repository that is managed by tfs. However locally I would like to manage it via git and the push changes to tfs. Once I'm creating git repo over there VS2013 in team explorer shows this solution managed by git only. If I try to edit any file it complains that file is read ...
For your scenario [`Git-tf`](http://gittf.codeplex.com/) is probably a better solution, it will create a local git repo based on your TFVC source control folder. When you're done, you can push your changes from Git directly to TFVC from the commandline. Since you're already comfortable on the commandline, that might wo...
12617547
How to configure svn ignore settings with git svn?
19
2012-09-27 08:52:45
<p>I know I can configure folders and files for being ignored by subversion using the following commands:</p> <pre><code>svn propset svn:ignore build . // Ignores the build folder. svn propedit svn:ignore . // Opens an editor. </code></pre> <p>Though, I use <code>git svn</code> to checkout a repository stored on a su...
6,379
356,895
2024-11-21 11:08:33
12,619,822
13
2012-09-27 10:59:45
1,212,681
2024-11-21 11:08:33
https://stackoverflow.com/q/12617547
https://stackoverflow.com/a/12619822
<p>No, git-svn supports only creation of <code>.gitignore</code> by <code>svn:ignore</code>. To set <code>svn:ignore</code> you may</p> <ol> <li><p>Use <code>svn propset svn:ignore 'value' URL</code> where URL can be obtained by (<code>git-svn git svn info path/to/directory | awk '/URL:/{print $2}'</code>) So you may w...
<p>No, git-svn supports only creation of <code>.gitignore</code> by <code>svn:ignore</code>. To set <code>svn:ignore</code> you may</p> <ol> <li><p>Use <code>svn propset svn:ignore 'value' URL</code> where URL can be obtained by (<code>git-svn git svn info path/to/directory | awk '/URL:/{print $2}'</code>) So you may w...
63, 6452, 19160, 68156
git-svn, svn, svnignore, svn-propset
<h1>How to configure svn ignore settings with git svn?</h1> <p>I know I can configure folders and files for being ignored by subversion using the following commands:</p> <pre><code>svn propset svn:ignore build . // Ignores the build folder. svn propedit svn:ignore . // Opens an editor. </code></pre> <p>Though, I use ...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
22,519
git
# How to configure svn ignore settings with git svn? I know I can configure folders and files for being ignored by subversion using the following commands: ``` svn propset svn:ignore build . // Ignores the build folder. svn propedit svn:ignore . // Opens an editor. ``` Though, I use `git svn` to checkout a repositor...
No, git-svn supports only creation of `.gitignore` by `svn:ignore`. To set `svn:ignore` you may 1. Use `svn propset svn:ignore 'value' URL` where URL can be obtained by (`git-svn git svn info path/to/directory | awk '/URL:/{print $2}'`) So you may write your own 'svn_propset.sh' script. To sync your .gitignore with sv...
11506113
Why after copying git repository to another dir I have modified files?
19
2012-07-16 14:09:31
<p>I have my personal small git repository on my laptop. I have just commited the changes and checked that I have nothing to commit - every staged and modified file has been commited. </p> <p>After that I have copied all the files from this repo to another location and boom! I have uncommitted changes. </p> <p>I beli...
8,458
675,100
2017-07-31 11:20:58
11,506,405
13
2012-07-16 14:25:29
291,641
2012-07-16 14:25:29
https://stackoverflow.com/q/11506113
https://stackoverflow.com/a/11506405
<p>Your files on windows probably have carriage-return line-feed line endings and you likely have core.autocrlf true on your windows box. Don't copy it like that between different platforms. Instead create a new git repository on the linux box and pull from the the Windows box. You can either use <code>git bundle</code...
<p>Your files on windows probably have carriage-return line-feed line endings and you likely have core.autocrlf true on your windows box. Don't copy it like that between different platforms. Instead create a new git repository on the linux box and pull from the the Windows box. You can either use <code>git bundle</code...
119, 4330, 5098, 5597, 7330
commit, copy, copy-paste, git, repository
<h1>Why after copying git repository to another dir I have modified files?</h1> <p>I have my personal small git repository on my laptop. I have just commited the changes and checked that I have nothing to commit - every staged and modified file has been commited. </p> <p>After that I have copied all the files from thi...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
22,520
git
# Why after copying git repository to another dir I have modified files? I have my personal small git repository on my laptop. I have just commited the changes and checked that I have nothing to commit - every staged and modified file has been commited. After that I have copied all the files from this repo to another...
Your files on windows probably have carriage-return line-feed line endings and you likely have core.autocrlf true on your windows box. Don't copy it like that between different platforms. Instead create a new git repository on the linux box and pull from the the Windows box. You can either use `git bundle` or `git daem...
10901102
Trying to push to BitBucket but I get "master conq: repository access denied." "fatal: The remote end hung up unexpectedly"
19
2012-06-05 16:26:26
<p>I'm doing like this to push changes my bitbucket repository:</p> <pre><code>$: git push origin master conq: repository access denied. fatal: The remote end hung up unexpectedly </code></pre> <p>What does this error mean and how do I fix it?</p> <p>Debug info for bitbucket: <code>ssh -T -v git@bitbucket.org</cod...
19,266
1,077,220
2016-07-22 14:54:52
10,901,473
13
2012-06-05 16:52:43
6,309
2014-07-22 08:23:49
https://stackoverflow.com/q/10901102
https://stackoverflow.com/a/10901473
<p>In term of ssh access (like an ssh BitBucket repo address similar to <code>ssh://git@bitbucket.org/accountname/reponame.git</code>, double-check:</p> <ul> <li>the help page "<a href="https://confluence.atlassian.com/display/BITBUCKET/Use+the+SSH+protocol+with+Bitbucket" rel="nofollow noreferrer">Using the SSH proto...
<p>In term of ssh access (like an ssh BitBucket repo address similar to <code>ssh://git@bitbucket.org/accountname/reponame.git</code>, double-check:</p> <ul> <li>the help page "<a href="https://confluence.atlassian.com/display/BITBUCKET/Use+the+SSH+protocol+with+Bitbucket" rel="nofollow noreferrer">Using the SSH proto...
119, 8337
bitbucket, git
<h1>Trying to push to BitBucket but I get "master conq: repository access denied." "fatal: The remote end hung up unexpectedly"</h1> <p>I'm doing like this to push changes my bitbucket repository:</p> <pre><code>$: git push origin master conq: repository access denied. fatal: The remote end hung up unexpectedly </co...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
22,521
git
# Trying to push to BitBucket but I get "master conq: repository access denied." "fatal: The remote end hung up unexpectedly" I'm doing like this to push changes my bitbucket repository: ``` $: git push origin master conq: repository access denied. fatal: The remote end hung up unexpectedly ``` What does this erro...
In term of ssh access (like an ssh BitBucket repo address similar to `ssh://git@bitbucket.org/accountname/reponame.git`, double-check: - the help page "[Using the SSH protocol with bitbucket](https://confluence.atlassian.com/display/BITBUCKET/Use+the+SSH+protocol+with+Bitbucket)" and "[troubleshooting SSH Issues for b...
3300746
How to derive application build version string with Git's `describe` command?
19
2010-07-21 15:06:01
<p>I want to compose application build version that is automatically derived from the Git branch name I am on (when building) and the number of commits since the branch has diverged. I believe this will be unique for any commit in my Git repository? Branch names are unique, and commits are linked to each other along a ...
19,455
254,343
2019-10-01 12:24:04
3,303,844
13
2010-07-21 21:02:11
9,410
2010-09-08 05:50:19
https://stackoverflow.com/q/3300746
https://stackoverflow.com/a/3303844
<p>The thing you have you to understand about git is that branches are essentially merely commit bookmarks. The fact that you were on the <code>foo</code> branch when you made the <code>0deadbeef</code> commit is immaterial to the commit itself; the branch is not part of its identity.</p> <p>(Mercurial bakes the branc...
<p>The thing you have you to understand about git is that branches are essentially merely commit bookmarks. The fact that you were on the <code>foo</code> branch when you made the <code>0deadbeef</code> commit is immaterial to the commit itself; the branch is not part of its identity.</p> <p>(Mercurial bakes the branc...
81, 119, 12039
auto-versioning, git, versioning
<h1>How to derive application build version string with Git's `describe` command?</h1> <p>I want to compose application build version that is automatically derived from the Git branch name I am on (when building) and the number of commits since the branch has diverged. I believe this will be unique for any commit in my...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
22,522
git
# How to derive application build version string with Git's `describe` command? I want to compose application build version that is automatically derived from the Git branch name I am on (when building) and the number of commits since the branch has diverged. I believe this will be unique for any commit in my Git repo...
The thing you have you to understand about git is that branches are essentially merely commit bookmarks. The fact that you were on the `foo` branch when you made the `0deadbeef` commit is immaterial to the commit itself; the branch is not part of its identity. (Mercurial bakes the branch name into the commit. [In a va...
7347295
How can I recover from a missing blob in a Git repository?
18
2011-09-08 11:25:38
<p>I'm running Git 1.6.4.2. Garbage collection is failing saying &quot;error: unable to find <code>&lt;SHA1&gt;</code>&quot;.</p> <p>I've managed to determine that the missing object is a blob, and there is no way that I can get the blob file back. It seems that two scripts that run &quot;git add&quot; and &quot;git c...
33,649
232,452
2024-11-05 10:47:40
17,376,214
13
2013-06-29 02:49:00
232,452
2021-08-31 01:23:20
https://stackoverflow.com/q/7347295
https://stackoverflow.com/a/17376214
<p>After a bit more digging it turns out that my question is answered here: <em><a href="https://stackoverflow.com/questions/7201720">How to delete a blob from a Git repo</a></em> - <code>git prune</code> wasn't pruning the stuff I'd wound back because the reflog was still referring to it. Running</p> <pre><code>git r...
<p>After a bit more digging it turns out that my question is answered here: <em><a href="https://stackoverflow.com/questions/7201720">How to delete a blob from a Git repo</a></em> - <code>git prune</code> wasn't pruning the stuff I'd wound back because the reflog was still referring to it. Running</p> <pre><code>git r...
30, 119
database, git
<h1>How can I recover from a missing blob in a Git repository?</h1> <p>I'm running Git 1.6.4.2. Garbage collection is failing saying &quot;error: unable to find <code>&lt;SHA1&gt;</code>&quot;.</p> <p>I've managed to determine that the missing object is a blob, and there is no way that I can get the blob file back. It...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
22,524
git
# How can I recover from a missing blob in a Git repository? I'm running Git 1.6.4.2. Garbage collection is failing saying "error: unable to find `<SHA1>`". I've managed to determine that the missing object is a blob, and there is no way that I can get the blob file back. It seems that two scripts that run "git add" ...
After a bit more digging it turns out that my question is answered here: *[How to delete a blob from a Git repo](https://stackoverflow.com/questions/7201720)* - `git prune` wasn't pruning the stuff I'd wound back because the reflog was still referring to it. Running ``` git reflog expire --expire=now --all ``` fixed ...
4156648
Why doesn't Git remove some files when I switch a branch?
18
2010-11-11 16:27:25
<p>I have had this happen to me often. I am working on a master branch and I need to test a plugin, so I create a new branch and check it out. I download the plugin into the project directory and test it out. Then I switch back to the master branch and delete the branch I had created. </p> <p>What ends up happening is...
10,365
32,816
2017-03-10 14:40:45
4,156,912
13
2010-11-11 16:51:28
112,968
2012-03-15 18:19:54
https://stackoverflow.com/q/4156648
https://stackoverflow.com/a/4156912
<p>git will not remove untracked files from your working copy, so unless you added the files of the plugin and created a commit on the new branch git will not do anything to your plugin files.</p> <p>if you want to remove untracked file from your working tree, use <a href="http://schacon.github.com/git/git-clean.html"...
<p>git will not remove untracked files from your working copy, so unless you added the files of the plugin and created a commit on the new branch git will not do anything to your plugin files.</p> <p>if you want to remove untracked file from your working tree, use <a href="http://schacon.github.com/git/git-clean.html"...
119, 76220
git, git-branch
<h1>Why doesn't Git remove some files when I switch a branch?</h1> <p>I have had this happen to me often. I am working on a master branch and I need to test a plugin, so I create a new branch and check it out. I download the plugin into the project directory and test it out. Then I switch back to the master branch and ...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
22,526
git
# Why doesn't Git remove some files when I switch a branch? I have had this happen to me often. I am working on a master branch and I need to test a plugin, so I create a new branch and check it out. I download the plugin into the project directory and test it out. Then I switch back to the master branch and delete th...
git will not remove untracked files from your working copy, so unless you added the files of the plugin and created a commit on the new branch git will not do anything to your plugin files. if you want to remove untracked file from your working tree, use [`git clean`](http://schacon.github.com/git/git-clean.html) – be...
42530381
Issue with cherry pick: changes from previous commits are also applied
17
2017-03-01 11:22:20
<p>In my project, I released a version several months ago. After that release, I have done many changes on the master branch.</p> <p>If I encounter some bugs which were there in the last release, I fix them on the master branch, then cherry pick them to the branch I have created at the last release. Then I can provide...
17,030
1,015,678
2017-03-01 21:27:18
42,542,370
13
2017-03-01 21:27:18
1,256,452
2017-03-01 21:27:18
https://stackoverflow.com/q/42530381
https://stackoverflow.com/a/42542370
<blockquote> <p>As I understand, cherry picking a certain commit introduces a new commit to the target branch, with the changes done in the cherry picked commit.</p> </blockquote> <p>That is correct. However, these changes may not apply cleanly, in which case:</p> <blockquote> <p>... I encountered a merge confli...
<blockquote> <p>As I understand, cherry picking a certain commit introduces a new commit to the target branch, with the changes done in the cherry picked commit.</p> </blockquote> <p>That is correct. However, these changes may not apply cleanly, in which case:</p> <blockquote> <p>... I encountered a merge confli...
119, 36489, 78810
cherry-pick, git, git-cherry-pick
<h1>Issue with cherry pick: changes from previous commits are also applied</h1> <p>In my project, I released a version several months ago. After that release, I have done many changes on the master branch.</p> <p>If I encounter some bugs which were there in the last release, I fix them on the master branch, then cherr...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
22,532
git
# Issue with cherry pick: changes from previous commits are also applied In my project, I released a version several months ago. After that release, I have done many changes on the master branch. If I encounter some bugs which were there in the last release, I fix them on the master branch, then cherry pick them to t...
> As I understand, cherry picking a certain commit introduces a new commit to the target branch, with the changes done in the cherry picked commit. That is correct. However, these changes may not apply cleanly, in which case: > ... I encountered a merge conflict. At this point, `git cherry-pick` is doing a three-way...
36585393
git lfs ls-files : Asterisk (*) vs. Dash (-)
17
2016-04-12 22:42:27
<p>This is my listing of git lfs managed files</p> <p><code>$ git lfs ls-files</code></p> <pre><code>b1d5dd29dd - file1.zip 27d3073f43 - file2.zip fb4e699c05 * file3.zip </code></pre> <p><strong>Why does one file have an asterisk/star (*) beside it, while the others have a dash (-) beside them?</strong></p> <p>The ...
5,224
2,044,126
2020-09-18 15:07:13
36,585,611
13
2016-04-12 23:00:44
14,660
2016-04-12 23:07:48
https://stackoverflow.com/q/36585393
https://stackoverflow.com/a/36585611
<p>This wasn't documented in <a href="https://github.com/github/git-lfs/blob/master/docs/man/git-lfs-ls-files.1.ronn" rel="noreferrer">the ls-files man page</a>, so <a href="https://github.com/github/git-lfs/blob/8f90f594162d0a7e90e2f5785287f4327f097235/commands/command_ls_files.go#L50" rel="noreferrer">I dug into the ...
<p>This wasn't documented in <a href="https://github.com/github/git-lfs/blob/master/docs/man/git-lfs-ls-files.1.ronn" rel="noreferrer">the ls-files man page</a>, so <a href="https://github.com/github/git-lfs/blob/8f90f594162d0a7e90e2f5785287f4327f097235/commands/command_ls_files.go#L50" rel="noreferrer">I dug into the ...
119, 115244
git, git-lfs
<h1>git lfs ls-files : Asterisk (*) vs. Dash (-)</h1> <p>This is my listing of git lfs managed files</p> <p><code>$ git lfs ls-files</code></p> <pre><code>b1d5dd29dd - file1.zip 27d3073f43 - file2.zip fb4e699c05 * file3.zip </code></pre> <p><strong>Why does one file have an asterisk/star (*) beside it, while the oth...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
22,534
git
# git lfs ls-files : Asterisk (*) vs. Dash (-) This is my listing of git lfs managed files `$ git lfs ls-files` ``` b1d5dd29dd - file1.zip 27d3073f43 - file2.zip fb4e699c05 * file3.zip ``` **Why does one file have an asterisk/star (*) beside it, while the others have a dash (-) beside them?** The git lfs wiki seem...
This wasn't documented in [the ls-files man page](https://github.com/github/git-lfs/blob/master/docs/man/git-lfs-ls-files.1.ronn), so [I dug into the source code to find the answer](https://github.com/github/git-lfs/blob/8f90f594162d0a7e90e2f5785287f4327f097235/commands/command_ls_files.go#L50). ``` func lsFilesMarker...
28306781
How to convert a Git repo to a submodule, which is nested in another (parent) Git repo?
17
2015-02-03 19:06:34
<p>I have a Git repo which has subfolders as Git subrepositories.</p> <pre><code>+ main (local GIT repo) + subdirectory1 + plugin1 (created as local GIT repo) + plugin2 (created as local GIT repo) + subdirectory2 + subdirectory2a + plugin3 (created as local GIT repo) + subdirectory3 </code></...
6,306
4,523,359
2020-06-01 20:09:06
28,321,855
13
2015-02-04 12:50:09
1,863,229
2020-06-01 20:09:06
https://stackoverflow.com/q/28306781
https://stackoverflow.com/a/28321855
<p>Change to the <strong>main</strong> directory, checkout the master branch, and do the following Git command to create a new submodule for plugin1:</p> <pre><code>git submodule add (url_to_plugin1_repository) subdirectory1/plugin1sm </code></pre> <p>Here the "url_to_plugin1_repository" points to your current Git re...
<p>Change to the <strong>main</strong> directory, checkout the master branch, and do the following Git command to create a new submodule for plugin1:</p> <pre><code>git submodule add (url_to_plugin1_repository) subdirectory1/plugin1sm </code></pre> <p>Here the "url_to_plugin1_repository" points to your current Git re...
119, 456, 7330, 39597, 41612
git, git-extensions, git-submodules, repository, version-control
<h1>How to convert a Git repo to a submodule, which is nested in another (parent) Git repo?</h1> <p>I have a Git repo which has subfolders as Git subrepositories.</p> <pre><code>+ main (local GIT repo) + subdirectory1 + plugin1 (created as local GIT repo) + plugin2 (created as local GIT repo) + subdirect...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
22,535
git
# How to convert a Git repo to a submodule, which is nested in another (parent) Git repo? I have a Git repo which has subfolders as Git subrepositories. ``` + main (local GIT repo) + subdirectory1 + plugin1 (created as local GIT repo) + plugin2 (created as local GIT repo) + subdirectory2 + subdirect...
Change to the **main** directory, checkout the master branch, and do the following Git command to create a new submodule for plugin1: ``` git submodule add (url_to_plugin1_repository) subdirectory1/plugin1sm ``` Here the "url_to_plugin1_repository" points to your current Git repository for **plugin1**. A new director...
11876070
How can I push to a git bundle
17
2012-08-09 02:43:42
<p>I'm just starting to use git for version control. I'd like to keep a backup copy of my repository on a local fileserver. After reading about the right way to backup a git repository, I decided to store the repository as a git bundle on the fileserver. </p> <p>I can bundle my repository and copy the resulting bund...
7,953
1,586,373
2018-07-13 17:15:51
11,876,287
13
2012-08-09 03:16:43
893
2012-08-09 03:16:43
https://stackoverflow.com/q/11876070
https://stackoverflow.com/a/11876287
<p>You cannot push directly to a bundle file. A bundle file is a compressed representation of a repository, and to modify it would involve unbundling, pushing, and bundling again.</p> <p>One way to do this is as you said, create a new bundle every time you want to make a backup.</p> <p>Another way is to create a <em>...
<p>You cannot push directly to a bundle file. A bundle file is a compressed representation of a repository, and to modify it would involve unbundling, pushing, and bundling again.</p> <p>One way to do this is as you said, create a new bundle every time you want to make a backup.</p> <p>Another way is to create a <em>...
119, 2669, 4236
bundle, git, push
<h1>How can I push to a git bundle</h1> <p>I'm just starting to use git for version control. I'd like to keep a backup copy of my repository on a local fileserver. After reading about the right way to backup a git repository, I decided to store the repository as a git bundle on the fileserver. </p> <p>I can bundle m...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
22,536
git
# How can I push to a git bundle I'm just starting to use git for version control. I'd like to keep a backup copy of my repository on a local fileserver. After reading about the right way to backup a git repository, I decided to store the repository as a git bundle on the fileserver. I can bundle my repository and co...
You cannot push directly to a bundle file. A bundle file is a compressed representation of a repository, and to modify it would involve unbundling, pushing, and bundling again. One way to do this is as you said, create a new bundle every time you want to make a backup. Another way is to create a *bare* repository on ...
6118261
How to Migrate Git Projects to Be One Project with Subprojects
17
2011-05-25 00:18:31
<p>I have a number of projects that are in separate Git repositories right now. They are, likewise, in separate eclipse projects (because I was unable to use parent projects using the Maven plugin for a long time due to bugs in the m2 plugin). Now that works. </p> <p>So I combined the projects in Maven, making a base ...
3,022
346,741
2020-12-17 20:53:59
6,118,516
13
2011-05-25 01:06:26
82,294
2020-12-17 20:53:59
https://stackoverflow.com/q/6118261
https://stackoverflow.com/a/6118516
<p>You can do something called a &quot;subtree merge&quot; to combine multiple repositories into one. Let's suppose want to merge <code>~/projects/alpha</code> and <code>~/projects/beta</code> into a new project, <code>~/projects/multi</code>:</p> <pre><code>$ cd ~/projects/multi $ git init </code></pre> <p>Merge in t...
<p>You can do something called a &quot;subtree merge&quot; to combine multiple repositories into one. Let's suppose want to merge <code>~/projects/alpha</code> and <code>~/projects/beta</code> into a new project, <code>~/projects/multi</code>:</p> <pre><code>$ cd ~/projects/multi $ git init </code></pre> <p>Merge in t...
119, 456, 41612
git, git-submodules, version-control
<h1>How to Migrate Git Projects to Be One Project with Subprojects</h1> <p>I have a number of projects that are in separate Git repositories right now. They are, likewise, in separate eclipse projects (because I was unable to use parent projects using the Maven plugin for a long time due to bugs in the m2 plugin). Now ...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
22,537
git
# How to Migrate Git Projects to Be One Project with Subprojects I have a number of projects that are in separate Git repositories right now. They are, likewise, in separate eclipse projects (because I was unable to use parent projects using the Maven plugin for a long time due to bugs in the m2 plugin). Now that work...
You can do something called a "subtree merge" to combine multiple repositories into one. Let's suppose want to merge `~/projects/alpha` and `~/projects/beta` into a new project, `~/projects/multi`: ``` $ cd ~/projects/multi $ git init ``` Merge in the "alpha" project... ``` $ git remote add -f alpha ~/projects/alpha...
54052838
How can I calculate git tree hash?
16
2019-01-05 14:10:19
<p>For a nodejs project I need to determinate the hash of my folder to check the version. Actually, I made a script to test my code (without filesystem, directly of git api for my test). But it works half the time.</p> <ul> <li><a href="https://api.github.com/repos/zestedesavoir/zds-site/git/trees/8d66139b3acf78fa50e1...
2,705
2,226,755
2019-01-16 09:22:48
54,137,728
13
2019-01-10 22:20:43
6,394,138
2019-01-16 09:22:48
https://stackoverflow.com/q/54052838
https://stackoverflow.com/a/54137728
<p>Your code contains a problem, however fixing it doesn't remove the discrepancy in the A2 case.</p> <h1>The problem with your code</h1> <p>The official git algorithm for computing hashes on trees drops leading zeros from the mode field. In your examples, that field contains values <code>100644</code> and <code>0400...
<p>Your code contains a problem, however fixing it doesn't remove the discrepancy in the A2 case.</p> <h1>The problem with your code</h1> <p>The official git algorithm for computing hashes on trees drops leading zeros from the mode field. In your examples, that field contains values <code>100644</code> and <code>0400...
3, 119, 580, 581, 46426
git, hash, javascript, node.js, perl
<h1>How can I calculate git tree hash?</h1> <p>For a nodejs project I need to determinate the hash of my folder to check the version. Actually, I made a script to test my code (without filesystem, directly of git api for my test). But it works half the time.</p> <ul> <li><a href="https://api.github.com/repos/zestedesa...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
22,542
git
# How can I calculate git tree hash? For a nodejs project I need to determinate the hash of my folder to check the version. Actually, I made a script to test my code (without filesystem, directly of git api for my test). But it works half the time. - [A1](https://api.github.com/repos/zestedesavoir/zds-site/git/trees/...
Your code contains a problem, however fixing it doesn't remove the discrepancy in the A2 case. # The problem with your code The official git algorithm for computing hashes on trees drops leading zeros from the mode field. In your examples, that field contains values `100644` and `040000`, and the latter is recorded b...
51988464
Official laravel recommendation of .gitignore confuse me with unused folder
16
2018-08-23 14:44:30
<p>Following is the link for the official Laravel recommendation of .gitignore</p> <p><a href="https://github.com/laravel/laravel/blob/master/.gitignore" rel="noreferrer">https://github.com/laravel/laravel/blob/master/.gitignore</a></p> <p>This contains :</p> <pre><code>/node_modules /public/hot /public/storage /storag...
22,341
2,745,436
2020-12-02 11:02:27
51,988,790
13
2018-08-23 15:00:01
9,556,193
2018-08-23 15:12:11
https://stackoverflow.com/q/51988464
https://stackoverflow.com/a/51988790
<ol> <li><code>public/hot</code> is a temporary file used by webpack dev server.</li> <li><code>public/storage</code> is a symlink to <code>storage/app/public</code>. See <a href="https://laravel.com/docs/5.6/filesystem#the-public-disk" rel="noreferrer">filesystem documentation</a> for more info. <ul> <li>created by <...
<ol> <li><code>public/hot</code> is a temporary file used by webpack dev server.</li> <li><code>public/storage</code> is a symlink to <code>storage/app/public</code>. See <a href="https://laravel.com/docs/5.6/filesystem#the-public-disk" rel="noreferrer">filesystem documentation</a> for more info. <ul> <li>created by <...
5, 25056, 75151
gitignore, laravel, php
<h1>Official laravel recommendation of .gitignore confuse me with unused folder</h1> <p>Following is the link for the official Laravel recommendation of .gitignore</p> <p><a href="https://github.com/laravel/laravel/blob/master/.gitignore" rel="noreferrer">https://github.com/laravel/laravel/blob/master/.gitignore</a></p...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
22,543
git
# Official laravel recommendation of .gitignore confuse me with unused folder Following is the link for the official Laravel recommendation of .gitignore <https://github.com/laravel/laravel/blob/master/.gitignore> This contains : ``` /node_modules /public/hot /public/storage /storage/*.key /vendor /.idea /.vscode /...
1. `public/hot` is a temporary file used by webpack dev server. 2. `public/storage` is a symlink to `storage/app/public`. See [filesystem documentation](https://laravel.com/docs/5.6/filesystem#the-public-disk) for more info. - created by `php artisan storage:link` 3. `public/hot` is only used during development and ...
38629692
Each module has to have a unique path
16
2016-07-28 07:25:55
<p>I have imported a project from version control using GIT. After importing, syncing and all that, it gave me this error:</p> <blockquote> <p>Error:The modules 'LinkedCraftMobile', 'linkedcraft_android' point to same directory in the file system. Each module has to have a unique path.</p> </blockquote> <p>I want...
15,050
1,968,739
2020-08-27 16:30:05
38,629,816
13
2016-07-28 07:31:51
6,309
2020-08-27 16:30:05
https://stackoverflow.com/q/38629692
https://stackoverflow.com/a/38629816
<p>2016: It could be because of a <code>.gitmodules</code> including two entries with the same paths, but <a href="https://github.com/square/assertj-android/issues/174" rel="nofollow noreferrer">square/assertj-android issues 174</a> points out to another file:</p> <blockquote> <blockquote> <p>This usually is the result...
<p>2016: It could be because of a <code>.gitmodules</code> including two entries with the same paths, but <a href="https://github.com/square/assertj-android/issues/174" rel="nofollow noreferrer">square/assertj-android issues 174</a> points out to another file:</p> <blockquote> <blockquote> <p>This usually is the result...
119, 1386, 91905
android, android-studio, git
<h1>Each module has to have a unique path</h1> <p>I have imported a project from version control using GIT. After importing, syncing and all that, it gave me this error:</p> <blockquote> <p>Error:The modules 'LinkedCraftMobile', 'linkedcraft_android' point to same directory in the file system. Each module has to h...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
22,545
git
# Each module has to have a unique path I have imported a project from version control using GIT. After importing, syncing and all that, it gave me this error: > Error:The modules 'LinkedCraftMobile', 'linkedcraft_android' point to same directory in the file system. > Each module has to have a unique path. I wanted ...
2016: It could be because of a `.gitmodules` including two entries with the same paths, but [square/assertj-android issues 174](https://github.com/square/assertj-android/issues/174) points out to another file: > > This usually is the result of old `iml` files. Delete them all and re-import. > > Weird, removing the `.i...
31372321
How to revert a commit and create a new branch from those changes?
16
2015-07-12 20:36:49
<p>It's late Sunday and I made a bad mistake. I committed and pushed directly into the master branch, where I should have created a branch and pushed the changes to the new branch instead.</p> <p>So I could do a <code>git revert SHA</code> to revert the last commit with a new commit.</p> <p>However how about my changes...
16,181
92,153
2025-01-21 18:26:06
31,372,357
13
2015-07-12 20:40:24
893
2015-07-12 21:33:56
https://stackoverflow.com/q/31372321
https://stackoverflow.com/a/31372357
<p>If you are the only developer, then you can do a hard reset. If <code>abc123</code> is the SHA1 of the accidental commit, then do:</p> <pre><code>git checkout master git branch feature-branch git reset --hard abc123^ </code></pre> <p>This will keep your new commit in the new <code>feature-branch</code> branch (wit...
<p>If you are the only developer, then you can do a hard reset. If <code>abc123</code> is the SHA1 of the accidental commit, then do:</p> <pre><code>git checkout master git branch feature-branch git reset --hard abc123^ </code></pre> <p>This will keep your new commit in the new <code>feature-branch</code> branch (wit...
119
git
<h1>How to revert a commit and create a new branch from those changes?</h1> <p>It's late Sunday and I made a bad mistake. I committed and pushed directly into the master branch, where I should have created a branch and pushed the changes to the new branch instead.</p> <p>So I could do a <code>git revert SHA</code> to r...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
22,547
git
# How to revert a commit and create a new branch from those changes? It's late Sunday and I made a bad mistake. I committed and pushed directly into the master branch, where I should have created a branch and pushed the changes to the new branch instead. So I could do a `git revert SHA` to revert the last commit with...
If you are the only developer, then you can do a hard reset. If `abc123` is the SHA1 of the accidental commit, then do: ``` git checkout master git branch feature-branch git reset --hard abc123^ ``` This will keep your new commit in the new `feature-branch` branch (without switching to that new branch yet), and then ...
14475003
Recover staged but not committed files after 'git rm -rf'
16
2013-01-23 08:07:32
<p>On my local machine I removed files from folder. </p> <pre><code>git init git add --all </code></pre> <p>then I wrote (don't ask me, why! :) )</p> <pre><code>git rm -rf </code></pre> <p>I don't commit, yet. Now I have empty folders in my project. In <code>.git</code> folder has <code>objects</code> with 53 Mb of...
4,600
2,003,024
2017-04-16 03:36:02
14,475,432
13
2013-01-23 08:38:36
1,249,851
2013-11-08 07:12:02
https://stackoverflow.com/q/14475003
https://stackoverflow.com/a/14475432
<p><strong>(update)</strong> Use <code>git fsck</code> instead, it is a builtin command for retrieving files you have once added to git repository.</p> <pre><code>git fsck --lost-found --unreachable </code></pre> <p>after the command processing, retrieved files will be placed at <code>.git/lost-found/other</code>, wi...
<p><strong>(update)</strong> Use <code>git fsck</code> instead, it is a builtin command for retrieving files you have once added to git repository.</p> <pre><code>git fsck --lost-found --unreachable </code></pre> <p>after the command processing, retrieved files will be placed at <code>.git/lost-found/other</code>, wi...
119, 102491, 112901
git, git-fsck, git-rm
<h1>Recover staged but not committed files after 'git rm -rf'</h1> <p>On my local machine I removed files from folder. </p> <pre><code>git init git add --all </code></pre> <p>then I wrote (don't ask me, why! :) )</p> <pre><code>git rm -rf </code></pre> <p>I don't commit, yet. Now I have empty folders in my project....
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
22,551
git
# Recover staged but not committed files after 'git rm -rf' On my local machine I removed files from folder. ``` git init git add --all ``` then I wrote (don't ask me, why! :) ) ``` git rm -rf ``` I don't commit, yet. Now I have empty folders in my project. In `.git` folder has `objects` with 53 Mb of files. How ...
**(update)** Use `git fsck` instead, it is a builtin command for retrieving files you have once added to git repository. ``` git fsck --lost-found --unreachable ``` after the command processing, retrieved files will be placed at `.git/lost-found/other`, with file name of a sha256 hash. Although the original name is s...
10998142
git - pushing branch descriptions to remote
16
2012-06-12 13:53:52
<p>Once a week we have integration meetings where we review code in branches not merged in to master. As a starting point we use this to list open branches</p> <p><code>git branch -a --no-merged master</code></p> <p>We name our branches after ticket numbers so it tough to see what we are really looking at. I get ...
4,890
439,350
2020-11-13 17:04:41
10,998,641
13
2012-06-12 14:21:38
6,309
2020-11-13 17:04:41
https://stackoverflow.com/q/10998142
https://stackoverflow.com/a/10998641
<p>Considering the description is stored in the config file (here, the local one, within your Git repo), then, <strong>no</strong>, branch descriptions aren't pushed.</p> <p>Config files are not pushed (ever). See &quot;<a href="https://stackoverflow.com/questions/6547933/is-it-possible-to-clone-git-config-from-remote-...
<p>Considering the description is stored in the config file (here, the local one, within your Git repo), then, <strong>no</strong>, branch descriptions aren't pushed.</p> <p>Config files are not pushed (ever). See &quot;<a href="https://stackoverflow.com/questions/6547933/is-it-possible-to-clone-git-config-from-remote-...
119
git
<h1>git - pushing branch descriptions to remote</h1> <p>Once a week we have integration meetings where we review code in branches not merged in to master. As a starting point we use this to list open branches</p> <p><code>git branch -a --no-merged master</code></p> <p>We name our branches after ticket numbers so it...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
22,553
git
# git - pushing branch descriptions to remote Once a week we have integration meetings where we review code in branches not merged in to master. As a starting point we use this to list open branches `git branch -a --no-merged master` We name our branches after ticket numbers so it tough to see what we are really loo...
Considering the description is stored in the config file (here, the local one, within your Git repo), then, **no**, branch descriptions aren't pushed. Config files are not pushed (ever). See "[Is it possible to clone git config from remote location?](https://stackoverflow.com/questions/6547933/is-it-possible-to-clone-...
49055534
Git Push From One Remote Branch To Another Remote Branch
15
2018-03-01 17:33:46
<p>I am working with three forked versions of a source code. FYI I changed the names to not disclose identities/repos. Here is how it is laid out:</p> <pre><code>MyMBP:~/Documents/_library$ git remote -v abc https://github.com/abc/_library (fetch) abc https://github.com/abc/_library (push) origin https://github.com/...
18,708
3,654,588
2025-05-28 14:41:11
49,056,158
13
2018-03-01 18:14:18
3,159,253
2018-03-01 18:14:18
https://stackoverflow.com/q/49055534
https://stackoverflow.com/a/49056158
<p>First of all, you are sitting on a detached HEAD. It means that any commit that you have just made will not move the original branch pointer. So you have great chances to lose these commits if you change active branches, and that's why git push doesn't push anything new: original branch pointer hasn't been moved.</p...
<p>First of all, you are sitting on a detached HEAD. It means that any commit that you have just made will not move the original branch pointer. So you have great chances to lose these commits if you change active branches, and that's why git push doesn't push anything new: original branch pointer hasn't been moved.</p...
119
git
<h1>Git Push From One Remote Branch To Another Remote Branch</h1> <p>I am working with three forked versions of a source code. FYI I changed the names to not disclose identities/repos. Here is how it is laid out:</p> <pre><code>MyMBP:~/Documents/_library$ git remote -v abc https://github.com/abc/_library (fetch) abc ...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
22,556
git
# Git Push From One Remote Branch To Another Remote Branch I am working with three forked versions of a source code. FYI I changed the names to not disclose identities/repos. Here is how it is laid out: ``` MyMBP:~/Documents/_library$ git remote -v abc https://github.com/abc/_library (fetch) abc https://github.com/a...
First of all, you are sitting on a detached HEAD. It means that any commit that you have just made will not move the original branch pointer. So you have great chances to lose these commits if you change active branches, and that's why git push doesn't push anything new: original branch pointer hasn't been moved. Firs...
39693153
Git: --force-with-lease and multiple pushurls
15
2016-09-26 00:26:32
<p>I have a git repo with remote <code>origin</code> mirrored on 3 hosts.</p> <pre><code>$ git remote -v origin git@github.com:username/repo.git (fetch) origin git@github.com:username/repo.git (push) origin git@gitlab.com:username/repo.git (push) origin git@bitbucket.org:username/repo.git (push) </code></pre> <p>...
2,556
1,631,106
2021-01-13 07:52:10
41,153,073
13
2016-12-14 22:07:57
679,227
2016-12-14 22:17:13
https://stackoverflow.com/q/39693153
https://stackoverflow.com/a/41153073
<p>Very interesting question! I've tried it out and successfully reproduced what you are describing with Git 2.11.0 in these test repos:</p> <ul> <li><a href="https://github.com/hkdobrev/git-test" rel="noreferrer">https://github.com/hkdobrev/git-test</a></li> <li><a href="https://github.com/hkdobrev/git-test2" rel="no...
<p>Very interesting question! I've tried it out and successfully reproduced what you are describing with Git 2.11.0 in these test repos:</p> <ul> <li><a href="https://github.com/hkdobrev/git-test" rel="noreferrer">https://github.com/hkdobrev/git-test</a></li> <li><a href="https://github.com/hkdobrev/git-test2" rel="no...
119
git
<h1>Git: --force-with-lease and multiple pushurls</h1> <p>I have a git repo with remote <code>origin</code> mirrored on 3 hosts.</p> <pre><code>$ git remote -v origin git@github.com:username/repo.git (fetch) origin git@github.com:username/repo.git (push) origin git@gitlab.com:username/repo.git (push) origin git@bi...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
22,557
git
# Git: --force-with-lease and multiple pushurls I have a git repo with remote `origin` mirrored on 3 hosts. ``` $ git remote -v origin git@github.com:username/repo.git (fetch) origin git@github.com:username/repo.git (push) origin git@gitlab.com:username/repo.git (push) origin git@bitbucket.org:username/repo.git (...
Very interesting question! I've tried it out and successfully reproduced what you are describing with Git 2.11.0 in these test repos: - <https://github.com/hkdobrev/git-test> - <https://github.com/hkdobrev/git-test2> I was able to successfully push with `--force-with-lease` to both remote URLs by using the following ...
40556003
Which git.exe should I reference?
15
2016-11-11 20:50:33
<p>Git for Windows has installed four <code>git.exe</code> files.</p> <p>They seem <em>slightly</em> different (comparing bytes). </p> <p>Which should I use for other applications that want a reference to git.exe?</p> <ul> <li><code>\Program Files\Git\bin\git.exe</code></li> <li><code>\Program Files\Git\cmd\git.exe...
3,441
442,351
2016-11-11 21:28:10
40,556,175
13
2016-11-11 21:02:18
1,755,598
2016-11-11 21:28:10
https://stackoverflow.com/q/40556003
https://stackoverflow.com/a/40556175
<p>The different version are each one for a different purpose.</p> <ul> <li><p><code>\Program Files\Git\bin\git.exe</code><br> This is the actual git binary which is added to your path if you run it form any script etc.</p> <p>This entry found here in the git source script for windows:<br> <a href="https://github.com...
<p>The different version are each one for a different purpose.</p> <ul> <li><p><code>\Program Files\Git\bin\git.exe</code><br> This is the actual git binary which is added to your path if you run it form any script etc.</p> <p>This entry found here in the git source script for windows:<br> <a href="https://github.com...
64, 119, 4086
git, mingw, windows
<h1>Which git.exe should I reference?</h1> <p>Git for Windows has installed four <code>git.exe</code> files.</p> <p>They seem <em>slightly</em> different (comparing bytes). </p> <p>Which should I use for other applications that want a reference to git.exe?</p> <ul> <li><code>\Program Files\Git\bin\git.exe</code></l...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
22,558
git
# Which git.exe should I reference? Git for Windows has installed four `git.exe` files. They seem *slightly* different (comparing bytes). Which should I use for other applications that want a reference to git.exe? - `\Program Files\Git\bin\git.exe` - `\Program Files\Git\cmd\git.exe` - `\Program Files\Git\mingw64\bi...
The different version are each one for a different purpose. - `\Program Files\Git\bin\git.exe` This is the actual git binary which is added to your path if you run it form any script etc. This entry found here in the git source script for windows: <https://github.com/git-for-windows/build-extra/blob/69c134c...
31523712
"git status" in brief or short format like "ls -1"?
15
2015-07-20 18:25:54
<p>I need to take a bunch of files that have changed and <code>scp</code> them to different boxes for testing. I'm having trouble figuring out how to make <code>git status</code> give me a listing like <code>ls -1</code> so I can script the actions with minimal effort.</p> <p>I have an existing script that does what I...
10,140
608,639
2018-07-06 07:23:15
31,523,796
13
2015-07-20 18:30:47
1,733,477
2015-07-20 18:30:47
https://stackoverflow.com/q/31523712
https://stackoverflow.com/a/31523796
<p><code>git status --porcelain</code></p> <p>This will output in short format but will be consistent across all versions of Git.</p> <p><a href="http://git-scm.com/docs/git-status">git-status documentation</a></p> <p>Here is an excerpt from the reference:</p> <blockquote> <p><strong>--porcelain</strong> <br />Gi...
<p><code>git status --porcelain</code></p> <p>This will output in short format but will be consistent across all versions of Git.</p> <p><a href="http://git-scm.com/docs/git-status">git-status documentation</a></p> <p>Here is an excerpt from the reference:</p> <blockquote> <p><strong>--porcelain</strong> <br />Gi...
119, 54839
git, git-status
<h1>"git status" in brief or short format like "ls -1"?</h1> <p>I need to take a bunch of files that have changed and <code>scp</code> them to different boxes for testing. I'm having trouble figuring out how to make <code>git status</code> give me a listing like <code>ls -1</code> so I can script the actions with minim...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
22,559
git
# "git status" in brief or short format like "ls -1"? I need to take a bunch of files that have changed and `scp` them to different boxes for testing. I'm having trouble figuring out how to make `git status` give me a listing like `ls -1` so I can script the actions with minimal effort. I have an existing script that...
`git status --porcelain` This will output in short format but will be consistent across all versions of Git. [git-status documentation](http://git-scm.com/docs/git-status) Here is an excerpt from the reference: > **--porcelain** > Give the output in an *easy-to-parse format for scripts*. This is similar to the s...
31457753
What does "git+" mean in the url?
15
2015-07-16 14:55:57
<p>I installed jquery through npm in two apps.<br> Looking through the <code>package.json</code> I see this difference:</p> <p><code>"url": "https://github.com/jquery/jquery/blob/2.1.4/MIT-LICENSE.txt"</code><br> <code>"url": "git+https://github.com/jquery/jquery/blob/2.1.4/MIT-LICENSE.txt"</code></p> <p>What is the ...
7,514
3,479,456
2015-07-16 15:07:58
31,457,913
13
2015-07-16 15:03:31
2,389,720
2015-07-16 15:07:58
https://stackoverflow.com/q/31457753
https://stackoverflow.com/a/31457913
<p>It is said <a href="https://docs.npmjs.com/files/package.json#git-urls-as-dependencies" rel="noreferrer">here</a> that it serves the purpose of specifying it is a git url and allows you to use a <em>commit-ish</em> after a hashtag in the url</p> <blockquote> <p>Git URLs as Dependencies</p> <p>Git urls can be...
<p>It is said <a href="https://docs.npmjs.com/files/package.json#git-urls-as-dependencies" rel="noreferrer">here</a> that it serves the purpose of specifying it is a git url and allows you to use a <em>commit-ish</em> after a hashtag in the url</p> <blockquote> <p>Git URLs as Dependencies</p> <p>Git urls can be...
119
git
<h1>What does "git+" mean in the url?</h1> <p>I installed jquery through npm in two apps.<br> Looking through the <code>package.json</code> I see this difference:</p> <p><code>"url": "https://github.com/jquery/jquery/blob/2.1.4/MIT-LICENSE.txt"</code><br> <code>"url": "git+https://github.com/jquery/jquery/blob/2.1.4/M...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
22,560
git
# What does "git+" mean in the url? I installed jquery through npm in two apps. Looking through the `package.json` I see this difference: `"url": "https://github.com/jquery/jquery/blob/2.1.4/MIT-LICENSE.txt"` `"url": "git+https://github.com/jquery/jquery/blob/2.1.4/MIT-LICENSE.txt"` What is the difference? What ...
It is said [here](https://docs.npmjs.com/files/package.json#git-urls-as-dependencies) that it serves the purpose of specifying it is a git url and allows you to use a *commit-ish* after a hashtag in the url > Git URLs as Dependencies > > Git urls can be of the form: > > git://github.com/user/project.git#commit-ish > g...
22450215
git --global switch related to one user or all user?
15
2014-03-17 09:03:01
<p>Suppose I have two users A and B in my Linux system. I am logged in as user <code>A</code>. If i configure an option using the <code>--global</code> switch like this </p> <pre><code>git config --global user.name "my name" </code></pre> <p>Will this set option only for user A? Or it will affect both users: <code>A<...
2,777
1,202,487
2015-04-30 14:46:55
22,450,238
13
2014-03-17 09:04:22
1,323,940
2015-04-30 14:46:55
https://stackoverflow.com/q/22450215
https://stackoverflow.com/a/22450238
<p><code>--global</code> is the option to for configuring stuff for the current user. It stores data into you home directory in <code>~/.gitconfig</code> by default, or <code>./.config/git/config</code> if the file exists and <code>~/.gitconfig</code> does not.</p> <p><code>--system</code> is the option for all users,...
<p><code>--global</code> is the option to for configuring stuff for the current user. It stores data into you home directory in <code>~/.gitconfig</code> by default, or <code>./.config/git/config</code> if the file exists and <code>~/.gitconfig</code> does not.</p> <p><code>--system</code> is the option for all users,...
58, 119
git, linux
<h1>git --global switch related to one user or all user?</h1> <p>Suppose I have two users A and B in my Linux system. I am logged in as user <code>A</code>. If i configure an option using the <code>--global</code> switch like this </p> <pre><code>git config --global user.name "my name" </code></pre> <p>Will this set ...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
22,561
git
# git --global switch related to one user or all user? Suppose I have two users A and B in my Linux system. I am logged in as user `A`. If i configure an option using the `--global` switch like this ``` git config --global user.name "my name" ``` Will this set option only for user A? Or it will affect both users: `A...
`--global` is the option to for configuring stuff for the current user. It stores data into you home directory in `~/.gitconfig` by default, or `./.config/git/config` if the file exists and `~/.gitconfig` does not. `--system` is the option for all users, you probably need root access to use it and it stores data into ...
19021978
How to block push to master branch on remote
15
2013-09-26 07:29:12
<p>Is there any way to block code push directly to master? I tried adding a script in <code>.git/hooks/update</code>:</p> <pre><code>#!/bin/sh if [ $USER != "git-repo-admin" ]; then if [ "$1" == refs/heads/master ]; then echo "Manual pushing to this repo is restricted" exit 1 fi fi </code></pre> <p>But ...
13,775
951,963
2017-02-01 08:39:22
19,043,553
13
2013-09-27 05:52:17
951,963
2017-02-01 08:39:22
https://stackoverflow.com/q/19021978
https://stackoverflow.com/a/19043553
<p>The original script was perfect, I just needed to rename it from <code>.git/hooks/update.sample</code> to <code>.git/hooks/update</code> on the remote server and make sure it's executable.</p> <pre><code>#!/bin/sh if [ $USER != "git-repo-admin" ]; then if [ "$1" == refs/heads/master ]; then echo "Manual pus...
<p>The original script was perfect, I just needed to rename it from <code>.git/hooks/update.sample</code> to <code>.git/hooks/update</code> on the remote server and make sure it's executable.</p> <pre><code>#!/bin/sh if [ $USER != "git-repo-admin" ]; then if [ "$1" == refs/heads/master ]; then echo "Manual pus...
58, 119
git, linux
<h1>How to block push to master branch on remote</h1> <p>Is there any way to block code push directly to master? I tried adding a script in <code>.git/hooks/update</code>:</p> <pre><code>#!/bin/sh if [ $USER != "git-repo-admin" ]; then if [ "$1" == refs/heads/master ]; then echo "Manual pushing to this repo is...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
22,563
git
# How to block push to master branch on remote Is there any way to block code push directly to master? I tried adding a script in `.git/hooks/update`: ``` #!/bin/sh if [ $USER != "git-repo-admin" ]; then if [ "$1" == refs/heads/master ]; then echo "Manual pushing to this repo is restricted" exit 1 fi fi...
The original script was perfect, I just needed to rename it from `.git/hooks/update.sample` to `.git/hooks/update` on the remote server and make sure it's executable. ``` #!/bin/sh if [ $USER != "git-repo-admin" ]; then if [ "$1" == refs/heads/master ]; then echo "Manual pushing to this repo is restricted" ...
12175277
Disable auto-completion of remote branches in Zsh?
15
2012-08-29 09:56:05
<p>This is related to <a href="https://stackoverflow.com/questions/6623649/disable-auto-completion-of-remote-branches-in-git-bash">Disable auto-completion of remote branches in Git Bash?</a>. </p> <p>Anyone knows how to do the same with zsh?</p>
4,203
186,429
2018-03-27 08:39:13
17,133,279
13
2013-06-16 12:21:52
179,332
2013-06-16 12:21:52
https://stackoverflow.com/q/12175277
https://stackoverflow.com/a/17133279
<pre><code>zstyle :completion::complete:git-checkout:argument-rest:headrefs command "git for-each-ref --format='%(refname)' refs/heads 2&gt;/dev/null" </code></pre> <p>Explanation:</p> <p>Typing <code>git checkout &lt;Control-x&gt;&lt;h&gt;</code> invokes <code>_complete_help</code> which exposes the internals of how...
<pre><code>zstyle :completion::complete:git-checkout:argument-rest:headrefs command "git for-each-ref --format='%(refname)' refs/heads 2&gt;/dev/null" </code></pre> <p>Explanation:</p> <p>Typing <code>git checkout &lt;Control-x&gt;&lt;h&gt;</code> invokes <code>_complete_help</code> which exposes the internals of how...
119, 3791
git, zsh
<h1>Disable auto-completion of remote branches in Zsh?</h1> <p>This is related to <a href="https://stackoverflow.com/questions/6623649/disable-auto-completion-of-remote-branches-in-git-bash">Disable auto-completion of remote branches in Git Bash?</a>. </p> <p>Anyone knows how to do the same with zsh?</p>
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
22,564
git
# Disable auto-completion of remote branches in Zsh? This is related to [Disable auto-completion of remote branches in Git Bash?](https://stackoverflow.com/questions/6623649/disable-auto-completion-of-remote-branches-in-git-bash). Anyone knows how to do the same with zsh?
``` zstyle :completion::complete:git-checkout:argument-rest:headrefs command "git for-each-ref --format='%(refname)' refs/heads 2>/dev/null" ``` Explanation: Typing `git checkout <Control-x><h>` invokes `_complete_help` which exposes the internals of how zsh's completion system would act if you pressed TAB in the cur...
10867946
Trying to install git on OSX: cannont exec 'git-credential-osxkeychain': Permission denied`
15
2012-06-03 04:42:27
<p>I'm attempting to install Git on my new MBP and am following the documentation @ <a href="https://help.github.com/articles/set-up-git">https://help.github.com/articles/set-up-git</a>.</p> <p>I seem to have hit a snag at the point where it says : <code>If you do not have the helper, you can download it and copy it t...
16,120
627,552
2022-02-18 10:00:23
10,867,959
13
2012-06-03 04:45:07
1,377,021
2012-06-03 04:45:07
https://stackoverflow.com/q/10867946
https://stackoverflow.com/a/10867959
<p>Make the downloaded file executable:</p> <pre><code>chmod 755 git-credential-osxkeychain </code></pre>
<p>Make the downloaded file executable:</p> <pre><code>chmod 755 git-credential-osxkeychain </code></pre>
119, 369, 529
git, installation, macos
<h1>Trying to install git on OSX: cannont exec 'git-credential-osxkeychain': Permission denied`</h1> <p>I'm attempting to install Git on my new MBP and am following the documentation @ <a href="https://help.github.com/articles/set-up-git">https://help.github.com/articles/set-up-git</a>.</p> <p>I seem to have hit a sna...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
22,566
git
# Trying to install git on OSX: cannont exec 'git-credential-osxkeychain': Permission denied` I'm attempting to install Git on my new MBP and am following the documentation @ <https://help.github.com/articles/set-up-git>. I seem to have hit a snag at the point where it says : `If you do not have the helper, you can d...
Make the downloaded file executable: ``` chmod 755 git-credential-osxkeychain ```
9003840
How do I push to Git Repo given the following error: An internal Exception occurred during push: ssh://git@github.com/xxx/xxx.git: session is down
15
2012-01-25 13:54:50
<p>I recently set up a github account to store the source code of a project I have been working on.</p> <p>I am using <strong>egit eclipse</strong> plugin to push changes to <em>github</em>.</p> <p>I successfully pushed the initial code and 2 subsequent changes. However when I attempted to push the third change I was...
29,889
1,095,756
2015-02-27 07:45:07
9,889,350
13
2012-03-27 12:14:42
619,677
2012-05-07 10:23:02
https://stackoverflow.com/q/9003840
https://stackoverflow.com/a/9889350
<p>I experienced the same issue. Resolution follows:</p> <ul> <li>Delete origin push and fetch in remote(<code>Eclipse view --&gt; Git repositories</code>).</li> <li>Close Eclipse.</li> <li>Go to <code>.ssh</code> folder(Users/.ssh) and delete the key files(<strong>public</strong> and <strong>private</strong>).</li> <...
<p>I experienced the same issue. Resolution follows:</p> <ul> <li>Delete origin push and fetch in remote(<code>Eclipse view --&gt; Git repositories</code>).</li> <li>Close Eclipse.</li> <li>Go to <code>.ssh</code> folder(Users/.ssh) and delete the key files(<strong>public</strong> and <strong>private</strong>).</li> <...
53, 386, 43702
eclipse, egit, ssh
<h1>How do I push to Git Repo given the following error: An internal Exception occurred during push: ssh://git@github.com/xxx/xxx.git: session is down</h1> <p>I recently set up a github account to store the source code of a project I have been working on.</p> <p>I am using <strong>egit eclipse</strong> plugin to push ...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
22,567
git
# How do I push to Git Repo given the following error: An internal Exception occurred during push: ssh://git@github.com/xxx/xxx.git: session is down I recently set up a github account to store the source code of a project I have been working on. I am using **egit eclipse** plugin to push changes to *github*. I succe...
I experienced the same issue. Resolution follows: - Delete origin push and fetch in remote(`Eclipse view --> Git repositories`). - Close Eclipse. - Go to `.ssh` folder(Users/.ssh) and delete the key files(**public** and **private**). - Start eclipse and regenerate the keys(`Window --> Preferences --> General tab --> N...
8778796
Two different Git repo in same directory
15
2012-01-08 15:36:42
<p>I want to maintain two different git repos. The repos should stay in the same root directory. How to achieve it?</p> <p>What I'm want is: to manage two repositories that differ slightly. Can I have two completely different repositories in the same directory?</p>
15,951
493,329
2021-10-21 06:30:32
8,780,778
13
2012-01-08 20:00:48
1,864,976
2012-01-08 20:00:48
https://stackoverflow.com/q/8778796
https://stackoverflow.com/a/8780778
<p>You can achieve this by adding using one of these two options on the git command itself:</p> <pre><code>git --work-tree=where/my/code/is --git-dir=some/path/to/my/.git status </code></pre> <p>This would allow you to have 2 separate repos share the same working folder.</p> <p>However you should be able to get what...
<p>You can achieve this by adding using one of these two options on the git command itself:</p> <pre><code>git --work-tree=where/my/code/is --git-dir=some/path/to/my/.git status </code></pre> <p>This would allow you to have 2 separate repos share the same working folder.</p> <p>However you should be able to get what...
119
git
<h1>Two different Git repo in same directory</h1> <p>I want to maintain two different git repos. The repos should stay in the same root directory. How to achieve it?</p> <p>What I'm want is: to manage two repositories that differ slightly. Can I have two completely different repositories in the same directory?</p>
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
22,568
git
# Two different Git repo in same directory I want to maintain two different git repos. The repos should stay in the same root directory. How to achieve it? What I'm want is: to manage two repositories that differ slightly. Can I have two completely different repositories in the same directory?
You can achieve this by adding using one of these two options on the git command itself: ``` git --work-tree=where/my/code/is --git-dir=some/path/to/my/.git status ``` This would allow you to have 2 separate repos share the same working folder. However you should be able to get what you need by using one repo with m...
8542304
Rebasing a git history with empty commit messages
15
2011-12-17 03:14:44
<p>I recently converted an svn repository with <code>git svn</code>. Unfortunately the svn history has a number of empty commit messages. This is a problem when I rebase and edit/reword a commit before the most recent commit without a commit message.</p> <pre><code>$ git rebase -i d01 [detached HEAD ff9839c] asdf 2...
8,066
568,393
2021-07-31 14:55:15
8,542,434
13
2011-12-17 03:53:38
526,535
2011-12-17 03:53:38
https://stackoverflow.com/q/8542304
https://stackoverflow.com/a/8542434
<p>To replace empty commit messages with some template, you can do something like this:</p> <pre><code>git filter-branch -f --msg-filter ' read msg if [ -n "$msg" ] ; then echo "$msg" else echo "The commit message was empty" fi' </code></pre>
<p>To replace empty commit messages with some template, you can do something like this:</p> <pre><code>git filter-branch -f --msg-filter ' read msg if [ -n "$msg" ] ; then echo "$msg" else echo "The commit message was empty" fi' </code></pre>
119
git
<h1>Rebasing a git history with empty commit messages</h1> <p>I recently converted an svn repository with <code>git svn</code>. Unfortunately the svn history has a number of empty commit messages. This is a problem when I rebase and edit/reword a commit before the most recent commit without a commit message.</p> <pr...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
22,569
git
# Rebasing a git history with empty commit messages I recently converted an svn repository with `git svn`. Unfortunately the svn history has a number of empty commit messages. This is a problem when I rebase and edit/reword a commit before the most recent commit without a commit message. ``` $ git rebase -i d01 [deta...
To replace empty commit messages with some template, you can do something like this: ``` git filter-branch -f --msg-filter ' read msg if [ -n "$msg" ] ; then echo "$msg" else echo "The commit message was empty" fi' ```
620439
How to setup public git repositories?
15
2009-03-06 21:12:28
<p>I recently tried to setup git repo on a linux box and wasted about 10 hours with absolutely no results. There aren't any problems with compilation or anything like that, it's just configuration issue. 2 hours later I got mercurial to do everything i need:</p> <ol> <li>public repos</li> <li>web ui</li> <li>push/pull...
12,015
71,953
2012-08-27 14:00:23
620,500
13
2009-03-06 21:31:02
6,309
2011-04-06 14:20:20
https://stackoverflow.com/q/620439
https://stackoverflow.com/a/620500
<p><del>I believe (but I have not tried it yet) that <a href="http://eagain.net/gitweb/?p=gitosis.git;a=blob_plain;f=README.rst;hb=73a032520493f6b4186185d4826d12edb5614135" rel="noreferrer"><strong>gitosis</strong></a> is the way to go in order to:</del><br> Update: 2011, I have actually deployed <strong><a href="https...
<p><del>I believe (but I have not tried it yet) that <a href="http://eagain.net/gitweb/?p=gitosis.git;a=blob_plain;f=README.rst;hb=73a032520493f6b4186185d4826d12edb5614135" rel="noreferrer"><strong>gitosis</strong></a> is the way to go in order to:</del><br> Update: 2011, I have actually deployed <strong><a href="https...
119, 5968, 7330
git, public, repository
<h1>How to setup public git repositories?</h1> <p>I recently tried to setup git repo on a linux box and wasted about 10 hours with absolutely no results. There aren't any problems with compilation or anything like that, it's just configuration issue. 2 hours later I got mercurial to do everything i need:</p> <ol> <li>...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
22,570
git
# How to setup public git repositories? I recently tried to setup git repo on a linux box and wasted about 10 hours with absolutely no results. There aren't any problems with compilation or anything like that, it's just configuration issue. 2 hours later I got mercurial to do everything i need: 1. public repos 2. web...
~~I believe (but I have not tried it yet) that [**gitosis**](http://eagain.net/gitweb/?p=gitosis.git;a=blob_plain;f=README.rst;hb=73a032520493f6b4186185d4826d12edb5614135) is the way to go in order to:~~ Update: 2011, I have actually deployed **[gitolite](https://github.com/sitaramc/gitolite)** - make hosting `git` ...
550913
Setting Git for a team of 3 people?
15
2009-02-15 14:00:58
<p><strong>The post aims to summarize all pieces of information to set up a closed repository for 3 people in a competition.</strong> Please, feel free to add a problem to the list which I have not noted. Please, add each answer to each question as a separate answer.</p> <ol> <li><strong>Situation A:</strong> Drafts a...
4,831
54,964
2012-06-08 18:44:45
551,031
13
2009-02-15 15:23:25
55,284
2012-06-08 18:44:45
https://stackoverflow.com/q/550913
https://stackoverflow.com/a/551031
<p><strong>Situation A</strong></p> <p>It sounds like you want to set up a <a href="http://www.whygitisbetterthanx.com/#any-workflow" rel="nofollow noreferrer">integration manager workflow</a>. In this scenario, person A creates an initial repository which is the sacred repository. Each person, A, B and C, clones th...
<p><strong>Situation A</strong></p> <p>It sounds like you want to set up a <a href="http://www.whygitisbetterthanx.com/#any-workflow" rel="nofollow noreferrer">integration manager workflow</a>. In this scenario, person A creates an initial repository which is the sacred repository. Each person, A, B and C, clones th...
119, 456, 24526
git, gitosis, version-control
<h1>Setting Git for a team of 3 people?</h1> <p><strong>The post aims to summarize all pieces of information to set up a closed repository for 3 people in a competition.</strong> Please, feel free to add a problem to the list which I have not noted. Please, add each answer to each question as a separate answer.</p> <o...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
22,571
git
# Setting Git for a team of 3 people? **The post aims to summarize all pieces of information to set up a closed repository for 3 people in a competition.** Please, feel free to add a problem to the list which I have not noted. Please, add each answer to each question as a separate answer. 1. **Situation A:** Drafts a...
**Situation A** It sounds like you want to set up a [integration manager workflow](http://www.whygitisbetterthanx.com/#any-workflow). In this scenario, person A creates an initial repository which is the sacred repository. Each person, A, B and C, clones that repository for their personal work. When person B or C has ...
58019994
git warning: Log for 'master' only goes back to a date? How to refer to remote branch instead of local branch?
14
2019-09-19 23:33:11
<p>When I execute the below command in a working branch (checked out from remotes/origin/master today):</p> <pre><code>git checkout master git diff --name-status "@{2 days ago}" "@{now}" </code></pre> <p>It says:</p> <pre><code>warning: Log for 'HEAD' only goes back to Thu, 19 Sep 2019 16:01:05 -0700. </code></pre> ...
5,345
5,414,637
2020-07-06 16:01:15
58,020,183
13
2019-09-20 00:06:35
1,256,452
2019-09-20 00:06:35
https://stackoverflow.com/q/58019994
https://stackoverflow.com/a/58020183
<h3>TL;DR</h3> <p>This line:</p> <blockquote> <pre><code>commit a2d1acfe855899e7e9562a16b692aa5d1f44d5dd (HEAD -&gt; master, origin/master) </code></pre> </blockquote> <p>indicates that your <code>master</code> is already in sync with your <code>origin/master</code>, so you're on the same commit. The one caveat is,...
<h3>TL;DR</h3> <p>This line:</p> <blockquote> <pre><code>commit a2d1acfe855899e7e9562a16b692aa5d1f44d5dd (HEAD -&gt; master, origin/master) </code></pre> </blockquote> <p>indicates that your <code>master</code> is already in sync with your <code>origin/master</code>, so you're on the same commit. The one caveat is,...
119
git
<h1>git warning: Log for 'master' only goes back to a date? How to refer to remote branch instead of local branch?</h1> <p>When I execute the below command in a working branch (checked out from remotes/origin/master today):</p> <pre><code>git checkout master git diff --name-status "@{2 days ago}" "@{now}" </code></pre...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%git%'; a.Body LIKE '%<code>%git%'; q.Score > 5; a.Score > 10
22,573
git
# git warning: Log for 'master' only goes back to a date? How to refer to remote branch instead of local branch? When I execute the below command in a working branch (checked out from remotes/origin/master today): ``` git checkout master git diff --name-status "@{2 days ago}" "@{now}" ``` It says: ``` warning: Log ...
### TL;DR This line: > ``` > commit a2d1acfe855899e7e9562a16b692aa5d1f44d5dd (HEAD -> master, origin/master) > ``` indicates that your `master` is already in sync with your `origin/master`, so you're on the same commit. The one caveat is, this is from your Git's *memory* of their Git, the last time your Git talked t...