New answers tagged

2

Simplest answer: Add --exclude-vcs --exclude-vcs This excludes all version control system directories Personally I use tar -zcvf foo.tar.gz ./FOLDER_NAME --exclude-vcs so all you need to do is add the --exclude-vcs at the end of the command.


1

A simpler approach would be: Just tell your users to add an alias for your git-server to the ~/.ssh/config. Then they have the same convenience as with github and you don't have to do some weird redirections on the server side. For example: # put into ~/.ssh/config Host mygitlab Hostname git.example.org Port 10022 Then your users can just clone etc. ...


0

I have never done that but maybe this does what you want: You can put a Match block for the user git in sshd_config which contains ForceCommand. The forced command can be an ssh login to the real server. You can use public key authentication without passphrase so the users might not even notice this.


0

Atom uses the stable branch for its stable release builds, so to find the latest tag for a release you need to check that branch: $ git describe --tags stable v1.4.2-1-ge9db64c To retrieve the corresponding tag, keep everything up to the first -: $ git describe --tags stable | cut -d- -f1 v1.4.2 To get the version without the leading v, strip that off: ...


0

You could use diff to generate a patch with new, old and conflicting files. diff -Naur Libc-825 Libc-1044 The flags state -N treat missing files as new, -a all files are text, -u show lines before and after diff for easier identification and -r recursive. You can then apply the patch to the old directory and get the merged results.


1

tl;dr: GitEye = most intuitive UI, fastest workflow, highly customizable I'm a long time TortoiseHg Workbench poweruser and I love it, so naturally my completely opinionated criteria were mostly based on it: * full history visible in main window * beautiful tree (DAG), branches CLEARLY separated * current branch clearly visible in history * superclear ...


1

tl;dr: GitEye = most intuitive UI, fastest workflow, highly customizable I'm a long time TortoiseHg Workbench poweruser and I love it, so naturally my completely opinionated criteria were mostly based on it: * full history visible in main window * beautiful tree (DAG), branches CLEARLY separated * current branch clearly visible in history * superclear ...


1

If git(1) gave the diff, you have to use git apply (git uses most of the diff(1) unified format, but adds some git-specific handling). If applying the patch fails, either (a) the patch got corrupted (i.e., lines deleted/mutilated, tabs expanded, different line ending conventions), or (b) you are trying to apply the patch to a different base (it should work ...


2

What you have is an output from git diff (not the usual diff command). You would not use the usual patch program to apply it. Instead, you would use a git tool "apply". Further reading: How to read the output from git diff`? git-diff - Show changes between commits, commit and working tree, etc git-apply - Apply a patch to files and/or to the index How ...


1

Based on Caleb's answer, we can define a modified git command which permanently configures all of the repositories in this directory correctly, so that all future uses of vanilla git will use the new configuration. I use hub, which is another git wrapper, so I replaced my alias git=hub with this and called hub in my function - if you don't use hub, replace ...


0

You need to specify the bash shell in the shebang for this to work: #!/bin/bash When bash runs a script without a shebang or with #!/bin/sh it runs in POSIX mode which has some limitations.


0

Another option is to use an API token... I use the following on our internal gitLab server snippet: #!/bin/bash myemail="first.last@domain.com" # User API token can be found: "https://git.labs.domain.com/profile/account" git_api_token="m3iP27Jh8KSgNmWAksYp" # We'll use the HTTPS to push a ssh key to git, SSH for pull/push configuration ...


2

The following Perl code should get you very, very close to what I think you want. If you're not familiar with Perl, you'll need to install the DateTime::Format::Strptime module from CPAN... cpan install DateTime::Format::Strptime. Then, output your git log to a file git log > git.log. After that, paste the following code into a file, put the log file in ...


2

I ended up using precmd I put alias precmd 'source ~/.tcsh/precmd.tcsh' into my .cshrc file and moved my prompt set into that file. Source of the .tcsh set tmpstr = `(git status --untracked-files=no --porcelain >! ~/out ) >&! ~/out1` #echo $tmpstr #for debugging if !( -s ~/out ) then if !( -s ~/out1 ) then set gitstr = ...



Top 50 recent answers are included