CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM Installation (
-   -   Updating 1.7.x from git (

bhh August 9, 2010 03:40

Updating 1.7.x from git

When I execute the git pull command I get the following:
[user@OpenFOAM OpenFOAM-1.7.x]$ git pull
remote: Counting objects: 182, done.
remote: Compressing objects: 100% (128/128), done.
Indexing 130 objects...
remote: Total 130 (delta 84), reused 0 (delta 0)
100% (130/130) done
Resolving 84 deltas...
100% (84/84) done
39 objects were added to complete this thin pack.
* refs/remotes/origin/master: fast forward to branch 'master' of git:// 52680f8..b450273
Updating 52680f8..b450273
etc/bashrc: needs update
fatal: Entry 'etc/bashrc' not uptodate. Cannot merge.

I have used git pull many times before but never had any problem. Can anybody tell me what went wrong and what I need to do to get it rigth?


l_r_mcglashan August 9, 2010 04:13

You've changed your etc/bashrc file. If you type 'git status' when within the OpenFOAM-1.7.x directory structure, you'll see something like:


# On branch master
# Changed but not updated:
#  (use "git add <file>..." to update what will be committed)
#  (use "git checkout -- <file>..." to discard changes in working directory)
#    modified:  ../etc/bashrc
# Untracked files:
#  (use "git add <file>..." to include in what will be committed)
#    ../../cases/RDC/0/U

Before merging/pulling you should make sure that there are no modified files. In other words, your working directory should match your local master. So do

git commit -a -m "<Insert log entry here>"

git pull

bhh August 9, 2010 04:36

git commit -a -m "<Insert log entry here>"
What should I insert as <Insert log entry here>?


l_r_mcglashan August 9, 2010 04:49

Something helpful to explain what the commit was about. So if the bashrc file was the only one that was changed, maybe "bashrc file updated with change to openfoam path." or something equally descriptive. 'git log' will show you the history complete with these log entries.

bhh August 9, 2010 05:08

Her is what happened when I executed the command:
user@OpenFOAM OpenFOAM-1.7.x]$ git commit -a -m "bashrc file updated"
*** Your name cannot be determined from your system services (gecos).


git config ""
git config "Your Name"

To set the identity in this repository.
Add --global to set your account's default

fatal: empty ident <user@OpenFOAM.(none)> not allowed

l_r_mcglashan August 9, 2010 05:12


git config --global "<yourname>"
git config --global "<youremail>"

I think this will set up a .gitconfig file in your userspace.

bhh August 9, 2010 05:31

It works.

All times are GMT -4. The time now is 13:53.