Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read
Q&A

Posts tagged git

Subtag of version-control · 6 child tags

Use for questions about Git, an open-source distributed version control system (DVCS). The topics should include git usage (e.g. commands) and workflows.

Avoid adding Git repository product names (e.g. GitHub or GitLab) if the question is not specifically asking about a workflow involving that product (the mere usage of that repository is not enough).

This tag doesn't have a detailed wiki yet.

92%
+21 −0
Q&A What is HEAD in Git?

In Git documentation, there are lots of references to the term "HEAD". But what exactly is it? Some places refer to it as "a pointer to the current branch". So it's a branch? What is it used for?

1 answer  ·  posted 1y ago by hkotsubo‭  ·  last activity 3mo ago by hkotsubo‭

Question git terminology
75%
+4 −0
Q&A Keep local branch changes to resolve all remaining conflicts in a merge

On branch-x, I do git merge branch-y Now there are some conflicts, and git status shows Changes to be committed: new file: a new file: b Unmerged paths: (use "git a...

1 answer  ·  posted 4mo ago by Quasímodo‭  ·  last activity 4mo ago by Quasímodo‭

75%
+4 −0
Q&A How to configure .gitignore to ignore all files except a certain directory

MWE In the terminal run: mkdir mwe cd mwe mkdir dir touch f1.txt f2.pdf dir/f1.txt dir/f2.pdf git init . Create a .gitignore with: * # ignore all !dir/ # except this directory ...

1 answer  ·  posted 5mo ago by young_souvlaki‭  ·  last activity 5mo ago by Moshi‭

Question git gitignore
77%
+5 −0
Q&A PGP sign emails sent with git-send-email(1)

How can we use git-send-email(1) to sign patches (emails) with the gpg(1) keyring? I've heard it can be done, but couldn't find anything in the git-send-email(1) documentation nor in a web search.

2 answers  ·  posted 6mo ago by alx‭  ·  last activity 5mo ago by alx‭

Question git email pgp signing
83%
+8 −0
Q&A Is it possible to undo a git reset?

For some reason, I just wanted to undo a commit on my git repository, which I've done with the following command: git reset --soft HEAD~1 So far, so good. However, by mistake I issued the comma...

2 answers  ·  posted 6mo ago by celtschk‭  ·  edited 6mo ago by Alexei‭

Question git git-reset
81%
+7 −0
Q&A Console scripts in virtual environment do not output to terminal in git bash

I have console scripts in my virtual environment in \env\Scripts, installed with packages (e.g. black, pytest, coverage). If I try to execute these in Git Bash, the output is not returned to the te...

1 answer  ·  posted 9mo ago by boudewijn21‭  ·  last activity 8mo ago by boudewijn21‭

83%
+13 −1
Q&A What's the correct way to merge a branch and its dependent branch back to master?

In git I branched feature-A from master. To reduce eventual merge conflicts later, I branched feature-B, which heavily overlaps and depends on A, from feature-A. A build of the feature-B branch s...

2 answers  ·  posted 1y ago by Monica Cellio‭  ·  edited 11mo ago by hkotsubo‭

80%
+6 −0
Q&A Conditionally ignore files in git

I'm using git for LaTeX projects and am in a little dilemma about how to best ignore files. if I add *.pdf to my .gitignore file, I keep forgetting to force add included graphics if I don...

3 answers  ·  posted 11mo ago by samcarter‭  ·  last activity 11mo ago by Peter Taylor‭

Question git gitignore
25%
+0 −4
Q&A Git deployment vs SFTP deployment [closed]

I personally use git for deploying my hobby projects into cloud like Heroku. I came across the concept of sftp for uploading files. Now please differentiate these two deployments like when to use w...

0 answers  ·  posted 1y ago by aditya98‭  ·  closed 1y ago by Alexei‭

Question git sftp
80%
+6 −0
Q&A Is it a good idea to have a permanent branch for a feature?

I'm rather new to using git, so I'm not sure about the best practices regarding it. I have a feature branch branched off, and periodically when the feature needs to be updated I will add some commi...

3 answers  ·  posted 1y ago by Moshi‭  ·  last activity 1y ago by Hyperlynx‭

81%
+7 −0
Q&A How do I ask git-show-branch to display a commit range?

For some tasks, I find git show-branch easier to follow than git log. For example, inspecting the history on someone's PR before merging it. git show-branch master topic stops at the first common ...

1 answer  ·  posted 1y ago by ajv‭  ·  edited 1y ago by Alexei‭

81%
+7 −0
Q&A How can I find git branches where all branch-local commits are from specific people?

We have a bunch of dead branches in our git repository, and I'd like to clean them up. Ones that were merged (but not deleted at the time) are easy; we can see those in the branch list on Bitbucke...

2 answers  ·  posted 1y ago by Monica Cellio‭  ·  edited 1y ago by Alexei‭

Question git git-branch
88%
+14 −0
Q&A How should we share some content between two otherwise-independent git repositories?

We have two teams, dev and doc, and I'd like them to have shared access (via git) to a common subset of content. Specifically, I would like the examples that are used in the doc and that are scrip...

4 answers  ·  posted 2y ago by Monica Cellio‭  ·  last activity 2y ago by Monica Cellio‭

54%
+4 −3
Q&A How can I make --reset-author the default?

I do a lot of rebasing and amending of my topic branches. I don't think it's especially useful for me or my colleagues to see in the logs what date it was when I first started working on the partic...

3 answers  ·  posted 2y ago by Hyperlynx‭  ·  last activity 2y ago by Charlie Brumbaugh‭

Question git
66%
+2 −0
Q&A How do I configure Jenkins to strip the leading “origin/” in git branch parameter?

I'm using Jenkins with a branch parameter to specify the branch to build from. Other stuff downstream needs the branch name to not have the leading "origin/" -- just "feature/blahblah" or "bugfix/1...

1 answer  ·  posted 2y ago by Monica Cellio‭  ·  last activity 2y ago by Monica Cellio‭

Question regex git jenkins
60%
+1 −0
Q&A How to protect the git respository for a public_html folder on a Linux server?

On a Linux server, if you leave the .git folder unprotected in the public_html folder, its possible that someone could download the folder and then gain access to your files. There are two ways I h...

2 answers  ·  posted 2y ago by Charlie Brumbaugh‭  ·  last activity 2y ago by .                                                .‭

Question git linux
80%
+6 −0
Q&A How do I customize merge behavior for a shared git repo?

I often find it useful to arrange things so that each commit on master's first-parent is a discrete change. It allows git log --first-parent --oneline to be used as a concise, automatically-generat...

0 answers  ·  posted 2y ago by ajv‭  ·  last activity 2y ago by Alexei‭

Question git git-merge