CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Installation (http://www.cfd-online.com/Forums/openfoam-installation/)
-   -   Updating 1.7.x from git (http://www.cfd-online.com/Forums/openfoam-installation/78980-updating-1-7-x-git.html)

bhh August 9, 2010 03:40

Updating 1.7.x from git
 
Hi,

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://github.com/OpenCFD/OpenFOAM-1.7.x
old..new: 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?

rgds
Bjorn

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:

Code:

# 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
Code:

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

git pull
.

bhh August 9, 2010 04:36

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

Bjorn

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

Hi,
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).

Run

git config user.email "you@email.com"
git config user.name "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

Do:

git config --global user.name "<yourname>"
git config --global user.email "<youremail>"

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

bhh August 9, 2010 05:31

Thanks!
It works.
rgds
Bjorn


All times are GMT -4. The time now is 02:03.