Git is a free & open source, distributed version control system designed to handle everything from small to very large projects with speed and efficiency.
1
vote
2answers
25 views
git: how to add one file as a version of another?
I have a bash script that I've written during the course of the last week. Today, I've decided to finally give git a try before making any further changes, created a git repository, etc.
The script ...
1
vote
2answers
20 views
where is the 'Editor' variable kept in git?
I cloned a repo (using fictious examples here)
$ git clone http://someplace.somedomain.name/resource.git
went to the directory
$ cd resource
and then tried to edit a file within the resource ...
1
vote
0answers
21 views
generating git commit info with rubber (for LaTeX, Debian)
I'm using the rubber program (in Python, from Lauchpad) to process a LaTeX document (thru pdflatex called by rubber -d) on Debian/Sid/Linux (the document is some H2020 European R&D proposal). I ...
0
votes
1answer
17 views
Re- Setup git-svn repository in Mac after a cleanup
I need help in re- setting up a password protected, project repository in my Mac OS X after it was wiped due to hardware issues.
I followed these steps
Installed the Xcode Command Line version
...
4
votes
2answers
72 views
How to find all git repositories within given folders (fast)
Naive approach is find dir1 dir2 dir3 -type d -name .git | xargs -I {} dirname {}
, but it's too slow for me, because I have a lot deep folder structures inside git repositories (at least I think that ...
3
votes
1answer
22 views
Git command to strip multiple removed lines from the commits that originally added them
After I remove several lines from a git-versioned file, instead of making a new commit that removes those lines, is there a git command(s) that just strips those lines from the commits that originally ...
1
vote
2answers
59 views
Unmet dependencies while installing Git on Debian
I am attempting to install git on Debian 8.6 Jessie and have run into some dependency issues. What's odd is that I didn't have any issues the few times I recently installed Git in a VM while I was ...
0
votes
0answers
13 views
Static HTML alternative to cgit [migrated]
I would like to serve a collection of git repositories over HTTP, to be browsed by humans, and possibly checked-out (read-only). I'm aware of the existence of cgit for this purpose, but the only ...
0
votes
0answers
26 views
“git show HEAD” results in “fatal : ambiguous 'HEAD': unknown revision or path not in the working tree” [migrated]
I'm trying to fix a problem with git.
When I enter git show HEAD, I got the error fatal : ambiguous 'HEAD': unknown revision or path not in the working tree.
What could I do to fix this problem?
...
0
votes
2answers
17 views
Save into file git fetch terminal output
I have tried several ways to save into a log file 'git fetch output' from terminal, through a bash file but without success, like,
git fetch origin > output.log
or even adding output.log in the ...
1
vote
0answers
28 views
git ssh alias not working unless I add the key to ssh-agent (OSX)
I added a ssh alias to use a different key-pair for a certain domain. The key does not have a passphrase. I had followed the directions at https://confluence.atlassian.com/bitbucket/configure-...
2
votes
1answer
46 views
How to use “less -F” without “-X”, but still display output if only one page?
I'm tweaking the pager of Git, but I've got some issues with it.
What I want is:
Always colored output
Scrolling by touchpad or mouse
Quit-if-one-screen
And my current configuration is:
$ git ...
1
vote
1answer
31 views
Sudo-like utility for ssh, or at least git in particular?
I'd like to keep my keys secure, but also not have to enter a passphrase on every single git invocation, when I want to run several commands in quick succession. I've researched this, and found that ...
0
votes
1answer
15 views
Restore files from external USB after deleting .git [closed]
I have 20 years of work on my USB. After deleting .git files. I ran this command in the terminal:
sudo find . | grep .git | xargs rm -rf
I lost all folders and files.
When I look in Finder I was ...
1
vote
0answers
24 views
Git-annex link to different file names
Maybe this is just a crazy use case that doesn't work, but I was wondering if there's a way to build a file's history from files with different file names. I'm exploring this idea because I'd like to ...
0
votes
2answers
40 views
Understanding what git branch means, in this context
I'm trying to understand what does this code means:
function git_branch {
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ \1/'
}
but I don't get it. Someone said this ...
3
votes
1answer
65 views
I have nested git repos, will it cause a problem?
A history
I installed etckeeper
I decided to track e.g. shorewall firewall configuration as its own git repository. I think I wanted it to be easier to look at specific configuration changes. I ...
4
votes
4answers
60 views
List files not stored in Git repos
I want to find out what files in a certain directory are not managed by Git. This is so I because I use Git for backups, and I want to eventually get all my files personal in there.
What unix tool ...
0
votes
0answers
20 views
automatic create directory “git-shell-commands” in home directory when login to git-shell
I want to create directory "git-shell-commands" in home directory when login to git-shell
I need to user in Active Directory to use git-shell.
Now AD user can login to FreeBSD (Samba 4.4 + winbindd +...
4
votes
2answers
54 views
Add file outside git repository [closed]
Assume I have local workstation with root access and a server without root access. I want to share (mostly configuration) files between these two computers. So I set up a git repository with top-level ...
1
vote
1answer
30 views
“not regular file” when trying to scp .gitignore file [closed]
The remote directory already contains a .gitignore file, which I want to overwrite and upload a new one. After doing:
scp -P[portnumber] [email protected]:path/for/file/ location/of/file/.gitignore
I ...
1
vote
0answers
23 views
How to store different username-password key pair in SSH in GIT Bash?
Current Machine: Git Bash on Windows.
Trying to connect to a Mac through SSH.
When I execute the below command:
ssh [email protected] "ls"
Password: <myPassword>
Output (works as desired)...
1
vote
3answers
43 views
Run git fetch after any cd command
I need to run git fetch after any cd command in the background and only if I'm in a git directory.
I'm horrible at zsh/bash scripting and could use some help with this
0
votes
0answers
8 views
no gitlab connection possible, mac osx wifi git clone from gitlab stuck
I have a macbook mid 2009 running El Capitan and git client installed and properly working, I also have a Server running gitlab and it is also working pretty good. I have a normal wifi connection. ...
1
vote
1answer
35 views
Git Server: ignore whitespace changes in new commits
I found a lot of ways to deal with the whitespace problem in Git, but all of them require some sort of action on the user side: configure Git to ignore ws changes, setup a pre-commit hook with warning,...
1
vote
1answer
33 views
How to prevent `git difftool` from calling another `vimdiff`?
I have git configured (like below) to use vimdiff as difftool and compare another pair of files without prompting as soon as I call :qa. It's awesome. The only problem is sometimes there are ...
3
votes
1answer
28 views
Storing git results in a variable results in weird behaviour [duplicate]
I have a git repository with 2 branches:
$ git branch
* master
test/branch
I can list specific branches individually by doing the following:
$ git branch --list master
* master
$ git branch --...
1
vote
2answers
87 views
Dealing with machine specific configs when using git for configuration management
I've been using a git repo for managing my systems configs for a while now. I used the documentation on Digital Ocean tutorials here. Pretty much I have a remote repo on a server. Do a git clone of ...
0
votes
1answer
51 views
bash if condition on git command result
I have the following error due an invalid git command within my shell-script. git push blabla master results in fatal: 'blabla' does not appear to be a git repository
I would like to respond to ...
0
votes
0answers
18 views
Cause of git error - Insufficient permission for adding an object to repository database ./objects? [duplicate]
I'm skeptical about this error and want to share one cause. PLease share your views on whether it could be a reason for above mentioned error.
Scenario 1:-
i). I have cloned a local git repo which ...
0
votes
1answer
8 views
Remove all objects in repo but specified object
I'm trying to write a program that will get an object from github, without cloning the entire repo. The last line does not work, giving me
a Syntax error: "(" unexpected. It is supposed to remove ...
1
vote
2answers
31 views
Git - Remove file from two branches
I have two branches, which contain a file that has recently been added to git ignore. It is an auto-generated file. I removed it in the master branch from the cache using git rm --cached fileName. ...
1
vote
1answer
29 views
Git tracking dotfiles that are symlinked
I keep my dotfiles in a private git repo on bitbucket and this works great for the majority of my files (.vimrc, .tmux.conf etc) then I just set up symlinks from my home directory to my cloned gitrepo ...
1
vote
0answers
79 views
What is return code 1 for git-rebase? What are other values it could return?
I've got a script that takes changes from master and applies them to all branches. The script works well for us because we tag our releases and use dev-branches. We don't maintain a separate branch ...
1
vote
1answer
89 views
RepoForge used across many StackOverflow docs is down, What is the alternative?
I'm trying to download git. I could build from source except I have no source packages.
I tried yum install git but that couldn't find it.
I tried downloading the git rpm directly from Repoforge , ...
2
votes
0answers
74 views
Git Server with several repos
I'm setting up a Git server, and there will be three different groups working on different projects iOS, WebDevel, Android. I need to do it in a secure/safe way.
Meanwhile, I don't want iOS ...
2
votes
1answer
35 views
Merging part of kernel - best way?
For example: I have a kernel 3.16 from my embedded support, but I want to have some network wireless drivers from 3.19. What is the best way to merge only this drivers (not full kernel)?
I tried ...
1
vote
1answer
86 views
Checking for errors in bash script
How can I modified this script to conditionally execute ${deleteOldBranchRemote} when there is no error executing ${getRename}?
Now_hourly=$(date +%d%b%H%M)
#echo "$Now_hourly"
newrcName="rc$...
1
vote
1answer
26 views
Bash command inside .gitconfig file
I have a string (Github token) inside a file and I want this to be accessible via gitconfig only after I enter my keyring password.
For this I created a file /secret/token, and then chmod it to 400. ...
1
vote
1answer
56 views
Colored word-diff just like git's?
I've been for long using git's (colored) --word-diff which I find awesome. I found myself today in a situation where I had two strings I needed to compare word by word and craving for something just ...
1
vote
1answer
74 views
How to install custom source from git using my package manager in Gentoo?
I would like to install custom source from a git repository, but using my package manager (emerge for portage).
Background
I have installed Gentoo using EFI using Sakaki's tutorial, so I have ...
1
vote
0answers
18 views
How to handle multi-machine-dot-file-versioning
I'm thinking about versioning my dot-files via git on a public repository. I've moved all the interesting dot-files like .profiles or .vimrc to the repository and subsequently symlinked them to there ...
1
vote
2answers
111 views
git not using global config file or public key
I've setup a global git username and password while logged in as root on my Fedora server with the following commands:
git config --global user.email "[my email]"
git config --global user.name "[my ...
0
votes
0answers
18 views
Unknown mergtetool vimdiff
I'm running Red Hat 2.6.32. When I run "vimdiff", vim gets pulled up. When I do a "git mergetool" on my repo, it says "Hit return to start merge resolution tool (vimdiff)". I hit return, but then I ...
0
votes
2answers
18 views
How to make git clone install cli tool?
I am creating a cli tool in nodejs, that i want people to be able to run like this:
git clone mytool.git
mytool -arg1
Is it possible, or there needs to be a step in between. What would it be.
3
votes
1answer
30 views
“git show” shows strange characters on XTerm
On FreeBSD 10.3, I run a command like git show on xterm, the output contains some strange irrelevant characters as below. I'm not sure why.
2
votes
2answers
81 views
how to temporarily configure SSH proxy server
I'm often in a network that for some silly reason blocks TCP destination port 22. It doesn't seem practical to use a full VPN just to overcome this issue, so I'm sometimes using SSH proxy (via ...
-2
votes
1answer
19 views
How could I find those git documents('Everyday Git[1]' & 'Git User's Manual[2]') mentioned in the man pages?
The git(1) manual page says:
See gittutorial(7) to get started, then see Everyday Git[1]
for a useful minimum set of commands. The Git User’s Manual[2]
has a more in-depth introduction.
Where is ...
0
votes
1answer
143 views
Git Bash for both Ubuntu/Linux and Windows requires ssh-agent on restart
Each time I need to use git for both my Linux server as well as my home computer running Windows 10, I need to start ssh-agent, then provide it with my GitHub RSA key, the problem being that doing so ...
3
votes
1answer
82 views
Git pull error always for a binary file
I finished a git push to a Bitbucket repository and in the Bitbucket account I found these update were done. But when I do a git pull in a production CentOS server, I got error below. Does anyone know ...