Questions tagged [git]

Git is an open-source distributed version control system (DVCS). Use this tag for questions related to Git usage and workflows. DO NOT USE [github] tag for Git-related issues simply because a repository happens to be hosted on GitHub. Also, do not use this tag for general programming questions that happen to involve a Git repository.

Filter by
Sorted by
Tagged with
0
votes
0answers
6 views

How to merge two branches with some similar commits and no common ancestor?

I have a repository with two branches, master and front_end_dev. One of my coworkers created the front_end_dev branch from master and they share a commit history, but the histories are separate and ...
0
votes
1answer
12 views

fatal: Unable to create '/home/circleci/project/.git/index.lock': File exists

I'm running a step in my workflow that performs git checkout branchname right after CircleCI's built in - checkout step and I'm getting the following error: fatal: Unable to create '/home/circleci/...
0
votes
1answer
12 views

git: Show default / configured pager command

Git allows extensive configuration, with one of the values being core.pager. If this value is not set, Git performs some logic internally to automatically determine what the pager should be. ...
0
votes
0answers
9 views

gitlfs batch response: Post https://../info/lfs/objects/batch: ..proxyconnect tcp: tls: first record does not look like a TLS handshake

I have a bitbucket server git repo with LFS turned on. Yesterday I activated the use of LFS for a number of file types in my local clone and pushed all changes, including .gitattributes in the repo ...
1
vote
2answers
21 views

error in pushing the code in my private repository

Can someone help me with below issue: I cloned data from my professor Git url and trying to set my private account has upstream master and push the code in my private repository (https://github.com/...
2
votes
3answers
33 views

Assigning output of git log to powershell variable

I want to assign output of git log into a variable, output only goes to the screen and the variable is left null. $log = Push-Location $tempRepo;git init -q;git remote add origin ssh://[email protected]
0
votes
0answers
5 views

How to do a BitBucket Pull Request Conflict Resolution in IntelliJ IDEA

So, lets say I have development branch, and opened a PR for my feature branch into development. I have a conflict in say, 1 file (or 10, whatever) - bitbucket says what I need to do: git checkout ...
0
votes
0answers
11 views

How to link to a git commit from a different Github repo from an issue description

I created an issue on a Github repo like so: I put in 2 different git commit hashes, one became a hotlink the other didn't, and I strongly presume it's simply because one is in this repo the other is ...
0
votes
0answers
14 views

github PR showing every past commits

We recently switched workflow. Our (new) repository on github has 2 branches: master and develop. master is protected from direct pushes, only PRs are merged. develop is where all the fun happens. ...
0
votes
0answers
12 views

Fix Duplicate Commits from Git Rebase

I'm having a bit of trouble learning GIT and developing my own workflow. I have an environment where we are tracking stock code updates and then applying our custom changes on top of each new version ...
1
vote
0answers
11 views

Permission Denied Error Git using Azure VM

In attempting to use with what I'm familiar (as I'm not a huge fan of the Visual Studio git GUI) I've been attempting to use git bash inside our developer environments, which happen to be VMs in Azure....
0
votes
0answers
16 views

Prevent git from deleting gitignored settings file

Currently I have a settings file which is created on app installation. It is ignored via .gitignore. However, whenever I check out a new branch my settings file is wiped away. Is there a way to ...
0
votes
1answer
23 views

Do I have 2 kinds of git installed in my Mac? If so, which one will be used by default?

If I type on the terminal: > git --version git version 2.21.1 (Apple Git-122.3) And if I type: > brew upgrade git Warning: git 2.25.0_1 already installed I'm guessing, my computer has 2 ...
1
vote
0answers
11 views

Configuring git push/commit to not push/show submodule updates

I am working on a project that has numerous submodules. Here is the gist of how the project is structured: Bundle Repo -- Submodule A -- Submodule B -- Submodule C -- Submodule D -- Submodule E -- ...
0
votes
2answers
24 views

Git - undo commit (git reset --soft) does nothing

I just did a commit and realized I need to undo the commit without deleting any changes....how would I do that? I have tried git reset --soft and that did nothing, no errors nothing, when I enter that ...
0
votes
0answers
21 views

Git diff considering newly created files with same content as changed

I have an application that reads an input file "input.txt" and generates a new one, in the same folder also named "input.txt" (thus the original file is overwritten). In some situations, this output ...
3
votes
1answer
26 views

What happens to the original commits when we use interactive rebase?

I am trying the interactive rebase. Assuming I have a linear master branch with 6 commits and the HEAD is on the 6th commit, and I run git rebase -i HEAD~4 then it allows me to pick/edit/split/squash ...
0
votes
0answers
14 views

How to marge third party code to specific directory

I have third party application hosted on github. The application is divided into two separated repositories. I would like to create my aplication based on third party code but I need to upgrade third ...
0
votes
1answer
13 views

Git - Undo a commit on Team Explorer Visual Studio

I just did a huge commit and when I push it, I get this error: RPC failed; curl 55 SSL_write() returned SYSCALL, errno = 10054 I believe I get this error because my commit is too big to push, so I ...
0
votes
1answer
27 views

Question related to my laptop username being the author of commits

For some reason I didn't add my email properly under my github account. And looking at the commit history, for several commits, github shows the username of my local laptop instead of my github ...
-6
votes
0answers
32 views

Git rebase challenge [closed]

Please help to solve below question Local repository has been configured with following points Your local git repository(repo) will be linkedlist_java The remote repository has been pre-...
1
vote
2answers
24 views

How to add .gitignore while merging branches or ignore files on merging?

I am about to merge my developer branch to my master on gitlab. I commited by mistake a lot of files that I didnt wanna have on my master (they are about 150 files). I have created a merge request, ...
0
votes
0answers
10 views

Developing multi-client web applications [closed]

My company has built a web application in NodeJS that is licensed to multi customers. Each of these customers is able to come back and request new features to the core product. One of our customers ...
0
votes
2answers
37 views

Undo all new commits in a branch [duplicate]

Unintended I pull a remote branch feature1 into development 1. git checkout development 2. git pull origin feature1 The branch development is ahead of origin/development by N commits. I can't push ...
0
votes
2answers
19 views

Indisputable time-stamping for code in distributed versioning systems

It seems that the most popular versioning systems like Git and others allow for repository history modification - which in turn means that the date of commit/revision can be very easily forged. If one ...
0
votes
1answer
37 views

Docker or Windows Subsystem for Linux

I need to setup local dev environments for a team of 2 developers working in windows environments. Requirements for the dev environments are: Must run an exact copy of the production server ...
1
vote
1answer
42 views

Bash script executes too long. No output until abort

I have this script which I call with one argument. The argument is an IP address. I'm wondering about the execution time of this script. Sometimes it takes just several seconds, sometimes up to 30 ...
0
votes
0answers
12 views

SSH Bitbucket Clone in Visual Studio 2019 not working

Cloning a bitbucket repo using Visual Studio 2019 not working. I am able to clone using command line but not using Visual Studio 2019 Git extension. Command Line: start-ssh-agent.cmd then git ...
1
vote
1answer
15 views

Azure DevOps upload git hook to existing repository

Is it possible to upload a git hook (.git\hooks) to a existing repository? Is there any way to access the .git directory inside a Azure DevOps repo? Something like: https://server/collection/_git/...
0
votes
0answers
16 views

fastest way to download files from google cloude compute instance [closed]

I'm trying to download a very large binary (100GB) from my google cloude instance. Apparently it's just super slow! So far i've tried with git which doesn't work since the push size limit is exceeded....
-1
votes
0answers
19 views

Installing custom Git Python command man pages

I've written a custom Git command using Python and associated help. However installing my Python package places the man/html help pages in the directories liked by Python, not those liked by Git, so ...
0
votes
1answer
26 views

git config color shading

I am using git 2.24.0 with powershell And I have noticed that all the colors as defined in .gitconfig are overly dark shaded also what is supposed to be yellow is white and white is grey. In the ...
0
votes
0answers
18 views

How to deploy private git repo on shared hosting (cpanel)

I am trying to deploy my private git repo on cpanel, but I am facing this Error. I don't have terminal or ssh access to the cPanel, that is why I can not clone git repo with git commands. the only ...
-1
votes
0answers
16 views

Trying to clone my personal resources from github and I get errors

I have a private repository at github. When I do mymac:gitclone bajra$ git clone https://github.com/<username>/xyz.git Cloning into 'xyz'... remote: Repository not found. fatal: repository '...
0
votes
1answer
27 views

git status --ignored hangs indefinitely

tl;dr: Running git status --ignored in the root of my project never finishes. git status works fine. I started seeing the symptoms of this issue from my IDE - PhpStorm (though this issue would apply ...
1
vote
1answer
31 views

How to rebase both locally and remotely?

The orange shows the local branch, the yellow shows the remote branch. I rebased my branch locally. Then to push the changes to remote, I performed a pull (because it had informed me that my branch ...
0
votes
1answer
36 views

Finding the source branch of a merge commit

Let's say I have a feature branch called feat which got merged into the master branch: master feat | . (1) . |\ . | \ . | \ . | \ . | \. <-- create branch `feat` ...
0
votes
2answers
40 views

Why should we avoid using the rebase command on a branch that has been pushed?

I am looking for a simple example on why should we avoid using the rebase command on a branch that has been pushed when there are multiple people working with the project. I have read that it confuses ...
0
votes
0answers
17 views

Get the correct git branch name in archived artifacts from Jenkins

So, I have this android application in which I use jenkins to build debug apks. I am using custom file name for the apks. To use custom file name for the apks I use the following codes in app level ...
0
votes
0answers
19 views

Whenever I upload onto an existing repository, a github error 'repository not found' prevents me from doing it

I tried to create a repository wherein I can organize all my projects. However, I had trouble committing my existing folders onto it (essentially, when I committed folders that I had on my computer, I ...
0
votes
0answers
18 views

What are the benefits of GIT LFS when using same DB (Azure DevOps Server) holds both Git & Git LFS [closed]

I am wondering what is the benefit of Using Git Lfs for binary when i am using same server and Single Repo (Azure DevOps Server) to hold both of the DataBases - Git & Git Lfs? 1) Will i see then ...
0
votes
1answer
38 views

Understanding Git commands

I am trying to understand certain git commands that i saw in .sh file git ls-files . --exclude-standard --others -m | wc -l From my understanding, this should list all git files to commit? from git ...
0
votes
1answer
31 views

Github how to update the forked repo, entirely the same as newly forked

Many days ago, I forked the Airflow repo and I modified a little then submitted a PR. But today, I want to submit another PR, so I need to re-fork the latest Airflow source code, and discard all the ...
1
vote
1answer
28 views

Bash scripts Git cloned in VSCode are automatically converted to DOS format [duplicate]

Platform: Windows 10 Editor: VSCode Hi, I am working on Windows using WSL and develop on VSCode. I notice that whenever I clone a project that contains Bash scripts into VSCode, these scripts are ...
-1
votes
0answers
16 views

how to use git hooks to build and commit a file

Say I have a file that I need to build, such as a compiled C executable, and wish to use git hooks to ensure that I always build and add the latest version to all commits. (Whether or not I should be ...
-2
votes
0answers
23 views

What is a good workflow for developing a PHP/MySQL app for deployment on Heroku? [closed]

I have a pre-existing PHP/MySQL app that works locally. After deploying it to Heroku, there are a couple of things breaking, and there are also some additional changes I'd like to make to the app. I'm ...
1
vote
2answers
48 views

Oddness with git merges?

I'm new to git so this may seem simple to everyone else and I'm just not understanding. I'm getting ready to start a project with 1 other friend and we've decided to use git as our version control ...
1
vote
1answer
35 views

Can't connect to GitLab via ssh

Firstly, i created the ssh key pair with the command: ssh-keygen -o -t rsa -b 4096 -C "[email protected]" Then, i added content of the id_rsa.pub file to my GitLab profile. But when i tried to ...
2
votes
2answers
32 views

How to disable version control for new projects in IntelliJ?

When creating a new project in IntelliJ, version control is enabled by default and uses the IdeaProjects directory. None of the version control settings seem to matter: It would seem that when there ...
1
vote
1answer
28 views

What is the best way to add an experimental feature and then accept/discard it with Git?

If I'm on the local master branch of a project and I want to try something, with the option of either keeping it and continuing, or rejecting it and returning my code to its current state, what is the ...