1

I have uploaded code to my openshift JBoss server before but when I upload some code today there are no changes when I open the page in the browser. When I use git I use these commands:

git add . --all git commit -m "newcomment2" git push 

when I use git show I get a strange response:

error: cannot run pager: No such file or directory commit 3e1a0025bf9746fdb1e0329819f7cf79e3e8f8e4 Author: root <[email protected]> Date: Wed Oct 8 16:02:17 2014 -0400 newbloke2 diff --git a/upload.sh b/upload.sh deleted file mode 100755 index 606b8af..0000000 --- a/upload.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh -git add . --all -git commit -m "newbloke2" -git push \ No newline at end of file 

There should be a lot of other files on the server, it is only showing one, which is a SH script I made but wanted to delete.

2 Answers 2

2

This may be the result of the pager setting in your global .gitconfig.

You can set it using GIT_PAGER=cat parameter.

As mentioned in Ignacio Vazquez-Abrams stackoverflow answer you can also set it to not use a pager:

git --no-pager show

Alternatively, you could use the -p argument to paginate using less.

e.g. git -p show

To view you git configuration settings, use:

git config --list

Then check for a core.pager setting.

git_config man page

core.pager The command that git will use to paginate output. Can be overridden with the GIT_PAGER environment variable. Note that git sets the LESS environment variable to FRSX if it is unset when it runs the pager. One can change these settings by setting the LESS variable to some other value. Alternately, these settings can be overridden on a project or global basis by setting the core.pager option. Setting core.pager has no affect on the LESS environment variable behaviour above, so if you want to override git’s default settings this way, you need to be explicit. For example, to disable the S option in a backward compatible manner, set core.pager to less -+$LESS -FRX. This will be passed to the shell by git, which will translate the final command to LESS=FRSX less -+FRSX -FRX. 
1
  • using git --no-pager show gets rid of the error. There seems to be only one file in the git repository but in my local repo there are about 3. When I do git push it says the repo is up to date, but it isn't. Commented Oct 10, 2014 at 15:51
0

Although this is a very old question, I'd like to give a short answer, since I have had the same problem.

  1. Look if there is any pager-entry core.pager yet:
git config --list 
  1. If so, you can delete it:
git config --unset "core.pager" # or if there are more than one: git config --unset-all "core.pager" 
  1. Add less as your new pager:
git config --add "core.pager" "less" 

And you're done.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.