Questions tagged [git]

Git is an open-source distributed version control system (DVCS). Use this tag for questions about Git usage and workflows. Do not use this tag for general programming questions that happen to involve a Git repository. Do not use this tag for GitHub/GitHub Actions questions that do not involve git usage; use [github] or [github-actions] instead. Do not use the [github] tag for Git-related issues just because a repository happens to be hosted on GitHub.

git
Filter by
Sorted by
Tagged with
9 votes
1 answer
6k views

Git shortlog, case insensitive and file stat search

I looking for a way to query the git log to list the number of edited (added, updated, deleted) files where the commit message matches a specific entry. I have started with this command.... git ...
Dilemmat_Dag's user avatar
0 votes
2 answers
2k views

Couldn't call method UNetDomainReload because the class NetworkIdentity or method couldn't be found

I am trying to create a game using Unity 3D and Git with my team. It was working fine until I kinda messed up while merging (I think I gitignored the wrong files and they kinda conflicted with each ...
krismath's user avatar
  • 1,929
1 vote
1 answer
64 views

How to show last git commit of files

In github you can see the last commit of every file, how you do it using CLI only the only way I found right now is using this command for x in *; do printf '%s > %s\n' "$x" "$(git log --oneline -...
win-t's user avatar
  • 177
5 votes
0 answers
3k views

Jenkins pipeline get repository name on scm change

I have 10 git repositories configured in Jenkins pipeline job and included polling on scm change. Now on SCM change I wanted to know in which repository a change has been made. Using groovy ...
vinod's user avatar
  • 101
1 vote
1 answer
263 views

Git: keep two locations of the same file in sync

I have a git repo for a single-header C/C++ library that has a certain .h file in the root. That's where the main code lives. Now I want to make some bindings for other programming languages like ...
zserge's user avatar
  • 2,232
0 votes
2 answers
33 views

If I Unbind a TFS solution from TFS, is that local only or is the server changed

I'm working on a POC to migrate our source control from TFS to Stash/GIT. What I want to to is take a sample solution and, on my workstation, rebind it to Stash then check it in. However, I do not ...
user1443098's user avatar
  • 7,057
-2 votes
1 answer
66 views

how to use cmd commands for two different accounts [duplicate]

I have an account on github and also an account on bitbucket. When I use git commands, like commit, push, the data gets stored on my bitbucket account. What can I do to be able to use github account ...
Ans's user avatar
  • 1,212
0 votes
1 answer
38 views

git checkout ignored files from other branch

I have two branches A and B. Normally I work on the B branch in which I have a bunch of ignored stuff (untracked files). Now I have had to switch to the A branch to do some testing. Right after ...
Aisatora's user avatar
  • 444
-2 votes
1 answer
70 views

git rebase with merge commits

I'm trying to go back and squash some commits to clean up my history. The issue is I've got some merge commits included in my history, so the rebase fails, even if I do nothing. For example: * A ...
ewok's user avatar
  • 20.7k
0 votes
1 answer
42 views

Undo git push - local commit not reverted [duplicate]

I have 3 commits(c1, c2 and c3) to a branch (b). c3 is a bad commit. As I wanted to revert to c2 so I have undo the git push using following command cd /path/to/project (branch: b) git push -f ...
Junaid S.'s user avatar
  • 2,632
0 votes
1 answer
226 views

Jenkins and git building only the changed folders

I have a multibranch pipeline project in Jenkins. My Jenkins job mainly consists of building dotnet-core docker images and pushing them onto the docker repository then starting containers on a Jenkins ...
Yamuk's user avatar
  • 750
3 votes
1 answer
739 views

CodeIgniter and GIT: What not to check-in?

This is my first attempt with CodeIgniter and I'm trying to figure out how to configure it against a GIT repo. The basic idea here is to avoid checking-in framework files and somehow keep only my work ...
dotNET's user avatar
  • 34.4k
0 votes
1 answer
88 views

JGitflow tasks disappear after creating hotfix branch

I'm having an issue where I am able to initialize JGitflow and create a hotfix branch, however when I am on that branch, the JGitflow tasks disappear! If I try and 'publish' or 'finish' a branch I am ...
HaDoMin's user avatar
  • 311
0 votes
0 answers
687 views

Sourcetree: accessing two repos, one with a key pair and another with a password

I am trying to give access to a developer to our private git repo. He is using Sourcetree on a Mac, and I told him to configure it in the exact same way than I did: In Sourcetree, go to "Repository / ...
PaulJ's user avatar
  • 1,680
136 votes
17 answers
187k views

docker error on windows : the input device is not a TTY. If you are using mintty, try prefixing the command with 'winpty' [duplicate]

After I run this docker run --rm -v "/c/users/vipul rao/documents/github/wappalyzer:/opt/wappalyzer" -it wappalyzer/dev I am getting the following error the input device is not a TTY. If ...
Vipul Rao's user avatar
  • 1,595
0 votes
1 answer
338 views

How to run git diff with having revision info in the resulting output

I need to get git diff output which is expected to have revision info to each line i.e. $ git diff f08cbec42b80725e7840ae3d05f790f6fa9daa8e..cbe1c77ad85c58be93964bd8b8fb624f654b7670 diff --git a/...
aalekseyev's user avatar
1 vote
1 answer
2k views

Postgresql Database Version Control and tracking

I'm working on Postgresql and I need to frequently make changes to the data and switch between database versions. I used to make a virtual machine and use the snapshot feature but it's slow and ...
Ehab's user avatar
  • 596
1 vote
1 answer
1k views

Crucible + git, all commits should be reviewed

We are using crucible as review tool, but recently we get a requirement that all commits should be reviewed. In the way that we are using crucible now it's possible to commit code but not create ...
Evgen's user avatar
  • 1,278
0 votes
1 answer
190 views

How to go back to latest commit after seeing old stash

I applied a stash and then made several commits. After that, I decided to do a quick look at the stash again. So I typed: git stash apply stash@{0} I just wanted to see and did nothing. Now I just ...
Willy's user avatar
  • 23
2 votes
0 answers
620 views

Gitlab - SSH key issues - Unable to use SSH to clone the repository

We have many repositories in GITLab and we have enabled both HTTP and SSH for cloning the repositories. Now HTTP is working fine for cloning the repositories whereas the SSH is not working and it ...
Shalini's user avatar
  • 21
0 votes
0 answers
1k views

How can I log into Git directly from Atom?

I've been using Git Desktop for a while. Works seamlessly using the SSH keys. Recently got Atom and would like to use Atom for all Git work as well. But Git Push asks me to log in using username and ...
Bharat Devdas's user avatar
5 votes
3 answers
12k views

What is the difference between checkout and cherry-pick?

I have fetched a particular bug fix from a remote repository. Now I have two options: git checkout FETCH_HEAD git cherry-pick FETCH_HEAD and I am not sure what is happening in both cases. I have ...
Roman's user avatar
  • 128k
21 votes
4 answers
15k views

Actually undo git stash pop

This question had the same title but it is NOT the same question. That question is really asking "Discard results of git stash pop". This question is actually UNDO git stash pop in other words // ...
gman's user avatar
  • 104k
5 votes
1 answer
8k views

error: cannot spawn git: Function not implemented [duplicate]

I'm working on GIT repository. I have the project code on my local machine. I have created a repository in Bitbucket, Now I want to push all my code into this repository. for that, I follow all ...
Siddhartha esunuri's user avatar
0 votes
1 answer
120 views

Why would git fetch origin <hash> give non-zero but not an error message?

This was happening: $ git fetch origin 883c5186f0a17190453bfda1bcf1716e7f5fc8e2 && echo "everything is fine" $ git fetch origin 883c5186f0a17190453bfda1bcf1716e7f5sdfsd fatal: Couldn't find ...
Kit Sunde's user avatar
  • 36.5k
1 vote
1 answer
343 views

sourcetree doesn't appear Authenticate

I am using SourceTree and I want to connect it with my GitHub repository. So I normally wanna use "push" for pushing my works to repository but It doesn't show me a authenticate pop up window. and it ...
seong-hun shin's user avatar
3 votes
1 answer
328 views

Visual Studio 2017 constantly starts a new git.exe instance

I am trying to figure out why this is happening. Every time I run visual studio 2017 it continuously restarts git.exe which takes up 20% of cpu and 100 mb or ram. I am wondering if anyone could help ...
gorilla bull's user avatar
0 votes
1 answer
356 views

type of object 'NewsletterUsuario' has no len()

I'm new using django as a framework, I got a problem when I try to save a newsletter on my custom control_panel, I can save the message but the web crash and show me a typeError telling me about a ...
Carlos Alvarez's user avatar
2 votes
2 answers
375 views

.gitignore not being recursively applied

End Goal: Have git recursively ignore files of type *.abc Problem: Git Description: I have the following line in my gitignore top level file located at /home/alma/project-origin/.gitignore. /**/*....
puk's user avatar
  • 16.5k
-1 votes
1 answer
51 views

gitignore everything but 1 file [duplicate]

I am having trouble with my gitignore file. My directories look like this: /root /.gitignore /README.md /embedded-programming-periode-3/ /somefolder/ /somefiles.txt ...
L Ja's user avatar
  • 1,436
3 votes
2 answers
1k views

Git renamed files and inodes

Consider that we apply the following commands, to a file (hello.txt) tracked under git (in a clean working copy): echo "hi" >> hello.txt mv hello.txt bye.txt git rm hello.txt git add bye.txt ...
Attilio's user avatar
  • 1,682
1 vote
1 answer
968 views

Change Git repository location out of the root directory of Visual Studio 2015 solution

I have a Visual Studio solution in [D:\works\CobraSin], where Git puts his files as well. But I need that these files were located in another directory [C:\MainDocs...], where I have an automatic ...
Ricardo Ildefonso's user avatar
2 votes
0 answers
1k views

Mirror gitlab repo to SVN

I have gitlab repository that I want to mirror it to a (read-only) SVN using gitlab continuous integration. Every time I create a tag, I want gitlab CI to run a script to commit the master branch to ...
guilhermecgs's user avatar
  • 2,971
0 votes
2 answers
127 views

What can I do to use git properly in Terminal?

No matter what I try, I can't get it to work, i've been told to use git config --global user.name "Your Name" git config --global user.email [email protected] git commit --amend --reset-author: but I ...
Blue Pillow's user avatar
1 vote
1 answer
54 views

How can I use my `.gitignore` to ignore any file that is named like this: "*.tmp.*"?

How can I use my .gitignore to ignore any file that is named like this: *.tmp.*? For example i have a file called image.tmp.jpg, can I be able to mark this without typing the name every time in the ...
account's user avatar
  • 13
0 votes
0 answers
902 views

CI / CD and release management with Jenkins

Setup Visual Studio 2013 SCM using Git with bare repositories held on network filesystem SourceTree Jenkins build server Typical projects include c# WinFroms and Web Api/MVC applications Each VS ...
Sulphy's user avatar
  • 776
1 vote
1 answer
912 views

Number of lines added and deleted in files using gitpython

How to get/extract number of lines added and deleted? (Just like we do using git diff --numstat). repo_ = Repo('git-repo-path') git_ = repo_.git log_ = g.diff('--numstat','HEAD~1') print(log_) ...
Akhil Singhal's user avatar
1 vote
0 answers
126 views

buid failed on git push ionic master

Unfortunately, I cannot build my app on push ionic master in order to test on real device. However, when I do ionic serve everything is running smoothly. I tried to delete plugins, node module and run ...
Lorenzo Varano's user avatar
0 votes
1 answer
858 views

I cannot push code to ionic master

I'm having an issue with the new ionic pro app deployment and testing through GIT. I've gone through process of manually linking old ionic cloud project to the new ionic pro system and then when I ...
Ryan Coolwebs's user avatar
1 vote
2 answers
213 views

Tensorflow Serving Git Repository Stale? Tensorflow folder does not exist

I am attempting to create a Tensorflow server in accordance with the instructions. The docker build command works, as does the docker run command after it. However, when I attempt to cd into serving/...
VeryVeryGoodNews's user avatar
20 votes
3 answers
19k views

git.exe pull error: cannot spawn git: Invalid argument

I have an error exactly as it's on the picture. Tried various settings, googled, reinstalled. Git pull doesn't work in TortoiseGit, I can commit and push, though. I have ssh client in network tab. ...
toouur's user avatar
  • 343
1 vote
1 answer
551 views

git rm -r --cached does not work

After running this command on build directories I want not to be checked anymore, and adding those directories to .gitignore, git status still gives me: WordPressEditor/build/ build/ emoticon/...
Mehdi Haghgoo's user avatar
0 votes
1 answer
32 views

git push gives a separate empty path

I got five files, A, B, C, D, E in directory 1-NeuralNetworks*/Assignment I pushed A, B, C and D, E in two git pushes. However, Github repo shows this. If I clone the project, everything is fine and ...
PhoenixPan's user avatar
2 votes
1 answer
2k views

How can change the github user in vscode to push to my second account?

I'm using Visual Studio Code (Windows) and Github and it is working great. Now I created a new Github account and I would like to push changes to it too but VSCode uses my old github account which ...
Paul Smith's user avatar
1 vote
2 answers
3k views

Github ssh key macOS Sierra

I've been having problems with gitHub's SSH Key for Mac Sierra here: https://help.github.com/articles/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent/ I've been able to follow the steps of ...
user avatar
1 vote
1 answer
986 views

git commit count for each branch in date range

I am in a repository where there are many branches. I want to get commit count happening on each branch in a specific date range like in Month of September or October 2017 how many commits happened ...
Mayank Srivastava's user avatar
1 vote
0 answers
259 views

How to run Jenkins build job while committing via Eclipse (Windows 10)?

I was experimenting with eclipse and Jenkins but something I am missing here that's why while I am committing the code to local git from eclipse Jenkins build job is not triggering. While I am adding ...
r-developer's user avatar
3 votes
3 answers
11k views

pip install requirements.txt not working properly

I'm trying to install all my Python/Django packages on my Digital Ocean Django server. I have my requirements.txt in the root directory, so I perform pip install -r requirements.txt - however it doesn'...
Zorgan's user avatar
  • 8,687
7 votes
1 answer
2k views

How can I update my project version numbers using Git?

Say I have two branches: develop and feature. Assume I also have a file called VersionNumber which has the following content: BUILD_NUMBER 1 I want to use Git hooks so that, when I merge feature ...
alguru's user avatar
  • 404
4 votes
2 answers
5k views

When do you need ./gitcookies?

I see often this code around: #!/bin/bash touch ~/.gitcookies chmod 0600 ~/.gitcookies git config --global http.cookiefile ~/.gitcookies tr , \\t <<\__END__ >>~/.gitcookies ....
fabmilo's user avatar
  • 47.6k