Skip to main content
The 2024 Developer Survey results are live! See the results

All Questions

1 vote
1 answer
49 views

Git Submodule Changing Branch - unexpected behaviour

I want to pull in a great library from github into my code. As an minimum example, I'll create a new git repo so you can follow along! I arrived here because I wanted to change the branch of the ...
monkey's user avatar
  • 1,518
0 votes
0 answers
52 views

Running a previous GIT version of a Python project in VS Code

I'm developing a large GUI project in Python. I use VS Code as my editor and am using git for [local only] version control. I'm using the application as it's continuing to be developed, so I'm looking ...
sethdhanson's user avatar
3 votes
2 answers
85 views

Retrieving list of names of branches from repository that have been inactive/not committed to in the last 2 months

I'm trying to write a bash script to clean up some stuff and one part of it is to sort through all of the branches I have. I'm trying to get a list of the names of branches in a repo that haven't been ...
Pigeonman's user avatar
0 votes
1 answer
202 views

Handling hotfixes when working only with git master branch

I keep reading how people are forgoing the develop git branch and doing all work on master - and how this makes everything simpler. I tried it: I have a master branch (with linear history) and many ...
lonix's user avatar
  • 17.8k
1 vote
1 answer
211 views

How to put content of multiple directories (each representing different versions) into one local git repo

I have one folder, let's call it Product1.0 and multiple other folders like Product1.1, Product1.2, etc which are modified versions of Product. I want to put this entire thing in one local git repo, ...
Atharva Kitkaru's user avatar
0 votes
1 answer
42 views

Why git pull from 2 branches deletes some modifications from the first branch?

I have this scenario: branchA - with some modifications for 1.txt file branchB - with some other modifications for 1.txt file master - with old version of 1.txt file I am in the master branch. First ...
Ben.S's user avatar
  • 736
0 votes
1 answer
57 views

make a duplication of a branch with identical but not the same commits as of the original branch

I have this project added to a git repository with the main branch consisting of a number of commits. A--->B--->C--->D--->E as i'm doing some experimental modifications on commits A ...
Mohamad Bakhtiari's user avatar
1 vote
0 answers
60 views

Git log not update file date modified

We generally work on two developer and master brunch On developer rice, when friends make changes and make a reduction, when sending to the server, it says that the developer local branch should be ...
jaber sabzali's user avatar
1 vote
1 answer
346 views

Git - Loosing file after renaming and branch, why?

I initialize a new repository in an empty folder: git init Now I copy two files A.java and B.java into this folder and commit: git add A.java B.java && git commit -m "Added A.java and B....
user73347's user avatar
1 vote
2 answers
67 views

Setup Branches with GIT

I have various things I've written, and rewritten a couple times, without keeping track, and git seems the perfect solution to merge my disjointed code. However, the tutorials had me running around in ...
Rob Current's user avatar
0 votes
1 answer
2k views

Creating a (feature) subbranch results in the error "fatal: cannot lock ref 'refs/heads/feature/FeatureName': 'refs/heads/feature' exists" [duplicate]

I was trying to create a feature sub-branch, feature/featureName. There was some confusion amongst my team as some of us are using SourceTree and some of us are using Git Bash. In SourceTree, the ...
KamielDev's user avatar
  • 549
4 votes
1 answer
1k views

Update github branch from another branch

I have created a branch from another branch. Then I come back to previous branch and work on it. Now I have switched to second branch. But this second branch don't have the new changes of first branch....
Waqar Ahmed's user avatar
2 votes
2 answers
977 views

how to list all 'active' branches in git containing unmerged commits

I'm struggling to make sense of the history of a couple of very large repositories that have hundreds of (old) branches which never have been deleted (even though work on most of these branches is '...
mwallner's user avatar
  • 1,055
0 votes
2 answers
1k views

Can we create feature branch from release branch

I am practising git these days. I have a query regarding best pratice on creating feature branches. In my project, creating release branches first from develop branch and then creating feature ...
john's user avatar
  • 15
0 votes
1 answer
49 views

Getting the state of a commit, and reapplying it in another

Setup: ----- master branch \ \ sprint branch \ my branch --> commit ...
Sebi's user avatar
  • 4,452

15 30 50 per page
1
2 3 4 5
18