CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Installation

Updating 1.7.x from git

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 9, 2010, 03:40
Default Updating 1.7.x from git
  #1
bhh
Member
 
Bjorn H. Hjertager
Join Date: Mar 2009
Posts: 72
Rep Power: 17
bhh is on a distinguished road
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
bhh is offline   Reply With Quote

Old   August 9, 2010, 04:13
Default
  #2
Senior Member
 
Laurence R. McGlashan
Join Date: Mar 2009
Posts: 370
Rep Power: 23
l_r_mcglashan will become famous soon enough
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
.
__________________
Laurence R. McGlashan :: Website
l_r_mcglashan is offline   Reply With Quote

Old   August 9, 2010, 04:36
Default
  #3
bhh
Member
 
Bjorn H. Hjertager
Join Date: Mar 2009
Posts: 72
Rep Power: 17
bhh is on a distinguished road
Code:
git commit -a -m "<Insert log entry here>"
What should I insert as <Insert log entry here>?

Bjorn
bhh is offline   Reply With Quote

Old   August 9, 2010, 04:49
Default
  #4
Senior Member
 
Laurence R. McGlashan
Join Date: Mar 2009
Posts: 370
Rep Power: 23
l_r_mcglashan will become famous soon enough
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.
__________________
Laurence R. McGlashan :: Website
l_r_mcglashan is offline   Reply With Quote

Old   August 9, 2010, 05:08
Default
  #5
bhh
Member
 
Bjorn H. Hjertager
Join Date: Mar 2009
Posts: 72
Rep Power: 17
bhh is on a distinguished road
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
bhh is offline   Reply With Quote

Old   August 9, 2010, 05:12
Default
  #6
Senior Member
 
Laurence R. McGlashan
Join Date: Mar 2009
Posts: 370
Rep Power: 23
l_r_mcglashan will become famous soon enough
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.
__________________
Laurence R. McGlashan :: Website
l_r_mcglashan is offline   Reply With Quote

Old   August 9, 2010, 05:31
Default
  #7
bhh
Member
 
Bjorn H. Hjertager
Join Date: Mar 2009
Posts: 72
Rep Power: 17
bhh is on a distinguished road
Thanks!
It works.
rgds
Bjorn
bhh is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
OpenFOAM 1.7.x git problem olauer OpenFOAM Installation 18 July 29, 2010 06:36
git problem with http repository az_monger OpenFOAM Bugs 2 September 4, 2009 05:45
Urgent Git problem updating OF15x thomasduerr OpenFOAM Bugs 4 July 8, 2009 07:07
Urgent Git problem updating OF15x thomasduerr OpenFOAM 0 July 7, 2009 11:36
Installation Problem with GIT sega OpenFOAM Installation 2 May 8, 2009 08:46


All times are GMT -4. The time now is 10:59.