Join us in building a kind, collaborative learning community via our updated Code of Conduct.

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 this tag for general programming questions that happen to involve a Git repository.

0
votes
0answers
4 views

git svn authors duplicate error

I have to migrate our SVN repos to Git (FINALLY !). I don't know SVN very well, so maybe my lack of knowledge on this point is problem. Nevertheless, for now I plan to use git svn. But I have a ...
1
vote
1answer
9 views

Does git merge add all commits or only last commit?

So I have been using git merge and I don't understand if it adds all commits from merged branch or only the last one if for example i have a branch A and a branch B A has commit 1 2 5 B has commit 3 ...
1
vote
2answers
20 views

Merging with another feature branch before rebasing to Master in Git

So I'm trying to understand how Git handles certain processes and what are some already used practices. Let's say we have a Git repository with a branch called master. We also have two branches that ...
0
votes
0answers
9 views

What are the initial steps to setup a git repo on GitHub and my private server?

(I have seen pull/push from multiple remote locations but my question involves something slightly different, or at least different enough that I can't figure it out.) I am trying to write a script ...
0
votes
0answers
19 views

What is the correct way to use GIT in a remote repository?

We have a team of 3 programmers, and a dedicated server that we upload and download files through a FTP client. We are having edit colisions and I immediately thought about GIT. But how would it work ...
0
votes
0answers
17 views

Contributing Standards for GitHub? [on hold]

I was having trouble finding this information online and wanted to check with StackOverlow on possible resources. I am working with a team who have recently adopted GitHub with very little standards ...
0
votes
0answers
11 views

git push “src refspec refs/heads/feature/a-feature-branch does not match any”

After a git flow command for finishing a feature branch git flow feature finish a-feature-branch, the git push -v command always gives me the following error msg, no matter the branch I am. Pushing ...
0
votes
1answer
14 views

Github not showing commits in my master branch in contribution

I Googled the same but after the answer were highlighting towards commit made towards a fork won't be counted. My story happens to be different, I have my own Public Repository, I am making commits ...
0
votes
0answers
27 views

C# Git Process Not Executing on Checked Out Branch

I am trying to run a git command from my C# application. For some reason, the fetch as well as the pull command does not work (if I change the argument to tag it will tag the current branch). ...
0
votes
1answer
23 views

Xcode Version control: fatal: cannot do a partial commit during a merge?

When using git with Xcode interface, I get the following error after pressing commit # Files and Push. The working copy “Project” failed to commit files. fatal: cannot do a partial commit during ...
1
vote
3answers
28 views

get specific stuff from master while working on a branch

I´m working in a branch and I changed the structure of the project. If people make some changes to the master, how can I bring those changes to the my branch without messing up my change structure.
0
votes
1answer
27 views

How to avoid a file in a pull request with git

When cloning a Rails repository I have to update the mysql2 gem localy to a newer version for it to run on my machine. When creating a branch and then pull request with my changes how do I avoid ...
-1
votes
0answers
11 views

FOR WINDOWS: “fatal: cannot update the ref 'HEAD': unable to append to '.git/logs/HEAD': Permission denied”

After reading the following 5 threads on this same question, I was still unable to resolve this error: [ "when I try to commit in github..."][1] ["Git commit problem..."][2] ["'.git/logs/HEAD': ...
0
votes
0answers
9 views

pre-commit to call executable multiple times with every single file changed

I am trying to lint some terraform files in my Git repo and would like to run terraform fmt --write-true <for every modified file>. Is there a way to configure pre-commit hooks to call the ...
-1
votes
2answers
11 views

How to set Intellij Idea Terminal to git bash on mac os

How to set up terminal in idea to git like on windows Have tryied /usr/bin/git-shell.
1
vote
2answers
30 views

Identifying actual branch names of git commits

This is a simple git repository. I have tagged the commits with numbers for easy referencing. The repo has the following branches: master: 13 commits (1,2,3,4,5,6,7,8,9,10,11,12,13) new_branch: 8 ...
0
votes
1answer
15 views

Checking out a Github PR and then pulling updates?

I wrote a little bash script to check out PRs on the fly with: co URL co() { set $1 git fetch upstream git checkout pr/${1##*/} } Once I am checked out on the branch, I'm wondering the ...
0
votes
2answers
26 views

How to insert a commit into git history for reference without it having any effect on the rest of the history?

I have a git repository and found an old version of some of the corresponding files that I now want to insert into the git history for reference. The problem is that I do not want it to have any ...
0
votes
1answer
32 views

git branch unmerged but not “active” on Bitbucket

I am looking at a repository to which I contribute, going through the commit history manually, and I see "open" (unmerged) branches. For example, the branch my-branch is "unmerged" because this ...
1
vote
0answers
10 views

Bitbucket pre-branch-creation messages

I often find that I would like to remind myself or my teammates to do some task the next time a branch is created. Many times this task doesn't come in as a request to change something. For instance,...
1
vote
1answer
30 views

Git permissions different from folder to folder?

I am using Ubuntu 18.04.1 and I want to pull in code from Github. I am able to do this successfully in /home/me/project. I added the repo via git remote add origin git@github.com/XXXXXXX and ...
0
votes
1answer
21 views

how to config git when I pull so it does not create merge commit?

I have a rep with file A and file B, At time0 someone else changed file B and push to remote. At time1 I change file A in my machine, and committed , when I push to remote origin, git say I need pull, ...
1
vote
1answer
13 views

authenticate private vcs with specific user

I'm using gitblit to self-host my git repositories. I added them to my composer file: "repositories": [ { "type": "vcs", "url": "ssh://user@my.gitblit.com:29418/foo/repo.git" }...
0
votes
1answer
36 views

Why does git behave this way? Inconsistency between OS and VM accessing the same repository

Allow me to explain the setup.. I have a PC (Windows, not sure if that is a variable here or not) which has a git repository. This repoitory works and behaves as expected, for the sake of this ...
0
votes
1answer
24 views

How to converge 2 branches in Git

Is there a way in Git to converge 2 branches in Git with a single command? Suppose I have a branch feature1 where I'm developing a feature and another branch feature2 where I'm developing another ...
0
votes
0answers
29 views

Branch/Fork? Use case for similar projects with minor changes

I have a laravel project that is essentially duplicated for two/more sites. Some of these projects need minor adjustments in the code/layouts, some of these adjustments can be handled as a ...
0
votes
0answers
22 views

How to combine branch in git?

I used "git push origin master" but git upload the code into "https://bitbucket.org/username/stm32f4/src/2f863e25b31798103a498a8eafcaa3a66f70fbd3/" this address. When I look the original git address ...
-1
votes
0answers
14 views

SVN to Git migration Commit history Issue

I have a badly structured SVN repo. Let me try to give you an image. svn-repo | |--branches | | | |-- project1 | |-- project2 | |-- tragetProject | | | |-- ...
0
votes
1answer
22 views

Git command to show what came with the last git pull Modified, Deleted and Added files

I am currently using this Git command to show all modified files git log --name-status -1 --oneline What can I add to this command to show added and deleted files?
0
votes
0answers
8 views

nodejs heroku deployment error with message error: failed to push some refs to 'https://git.heroku.com/frozen-xxxxxxx.git'

I Am Trying To Push my repository to heroku but is not deploying it giving some error, i tried to search in google but i didn't get solution. so please help me to get solution. I'm actually Student ...
-2
votes
1answer
20 views

css not working on github pages

I can't get my CSS to show on the site. I really can't figure out what I'm doing wrong here, I'm very new to all of this so I'm sure there's something I just can't see. here is the live site https://...
0
votes
1answer
16 views

I accidentally removed my project using cmd command rd. git /s/q

I tried to upload my project to GitHub but accidentally deleted it. How can i restore it?
0
votes
1answer
23 views

Should I avoid having secret keys in a private git repository?

Currently I have all my various keys in a config file which is version controlled on a PRIVATE repo. The code is on a trusted side (Github). Should I avoid version controlling this config file in git? ...
0
votes
2answers
10 views

Create CI on VSTS with multiple git submodules from different project repositories

I am building CI on VSTS for one Desktop application, In the build .sln need some git submodules from other project git repo. Please suggest the way out to achieve the same. Build solution URL: ...
1
vote
1answer
17 views

Is it possible to use Git hooks to add a part of the commit to the source code of the file?

Years ago, I used to work with a version control software that used to automatically add authors and the first line of the commit at the top of the source code. He found this very useful to quickly ...
0
votes
0answers
15 views

git recommit changes made to subbranch-a to subbranch-b

I currently have a problem in which my feature branch is not up to date with master, resolving the conflict seem to take too much time in comparison how small the actual change is. My idea what to ...
0
votes
1answer
27 views

How to get older version of a file in git

Suppose my last commit includes 6 files A, B, C, D, E, F. Now I only want to revert changes of only file B. I have committed my whole project in git. My commit id is 41e6150. There are many files in ...
0
votes
1answer
22 views

How to compare local master with remote master in Git?

I have made few changes in my remote code on github.com. Now, I need to compare my local master branch with origin. I am using below command to get the diff, but I don't see the diff on the terminal. ...
0
votes
1answer
33 views

Git vim editor config

I work in windows and I use vim like default editor for commit. I would like configure vim to save the commit with Windows file format (CRLF) How I can do? Where is the vim configurations for git?
0
votes
0answers
19 views

git filter-branch error: unexpected EOF while looking for matching `"'

I want to move all codes generated on folder oldFolder\ to newFolder\, and there are hundreds of files in oldFolder\ from hundreds of past git commits, so when doing that, i want to make sure my git ...
0
votes
0answers
30 views

git undo all uncommited changes

There are approx 15 files changes in my demo branch and unfortunately, I execute git reset --hard <last reflog no.>. After execute this command, my all 15 files changes removed and I lose my all ...
0
votes
1answer
26 views

git commit with git container in google cloud build

I am playing around with Google Cloud Build. In my usecase I have to change a file during the build and commit it into git. I sketched the build steps like below and they do work. But that is a lot ...
1
vote
0answers
23 views

Vimdiff is not working in Git Bash, says E97: Cannot create diffs

Versions of things: OS: Win 8.1 Vim: 8.1 Git: 2.18.0.windows.1 GNU bash: 4.4.19(2) I am trying to use vimdiff in Git Bash but I get E97:Cannot create diffs error. From there both files are open next ...
0
votes
1answer
22 views

Upload local repository to github.com

I have a git repository which exists fully locally inside my PC. I want to create remote clone of it onto the github.com. How can it be done? Thanks.
1
vote
1answer
30 views

yarn install fails on cloning github packages in git post-receive hook

I have created a post-receive hook to deploy changes to an app and install packages via Yarn. It looks like this: #!/bin/sh echo "Checking out changes..." git --work-tree=/home/me/apps/app --git-dir=...
1
vote
1answer
14 views

Pre-push git hook produces unknown hash when pushing tags

I have the following python code as part of my pre-push git hook: import sys lines = sys.stdin.read().splitlines() for line in lines: local_ref, local_sha1, remote_ref, remote_sha1 = line.split() ...
1
vote
0answers
18 views

Getting git to show specific filenames it is running content filters on

I'm debugging the workings of a configured git content filter (nbstripout) and I'm trying to get GIT_TRACE to show me the files it's operating on, but it doesn't. Consider: $ GIT_TRACE=1 git pull ...
0
votes
1answer
21 views

Single file version in git-lfs

Is there a way to setup git-lfs to store only 1 version of an LFS tracked file? New versions of the file should replace the old. In other works, an old commit should reference the latest (only) ...
1
vote
0answers
17 views

Remove all commits for files except specific list

I have repo1 and repo2. I would like to port some files from repo1 into repo2 (their relative path will need to be updated inside the repo, but that can be a separate step). I tried this: Remove ...