Ok seems I did something wrong and committed it to the wrong branch
https://github.com/makkemal/FreeCAD/com ... adc8960f2a
hmm
please help
Moderator: bernd
makkemal wrote:Ok seems I did something wrong and committed it to the wrong branch ... please help
Code: Select all
# make a new branch from the master branch and push it to github
git checkout master
git checkout -b predeformation3
git log -1 predeformation3 # should show your commit
git push https://github.com/makkemal/FreeCAD.git predeformation3
# check with the webbrowser if the new branch and the commit is on github
Code: Select all
# fetch up to date FreeCAD (fcmaster if you copied it from my former posts)
git fetch fcmaster
git checkout -b tmp remotes/fcmaster/master
git status # you should be on branch tmp
git log -5 --oneline
# should show you the same commits on the web as https://github.com/FreeCAD/FreeCAD/commits/master
# delete lokal master
git branch -D master
# checkout new master
git status # still on branch tmp
git log -5 --oneline # still shows the latest 5 commit from FreeCAD github master
git checkout -b master # new lokal master branch from tmp
git status # yor are on your new master
git log -5 --oneline # shows the latest 5 commits from FCmaster --> lokal master should be fixed
# delete your wrong master branch on github
# in your webbrowser
# log in to github --> browse to YOUR repo --> click on branches --> delete master branch (ONLY this one)
# push the fixed local master to github
git push https://github.com/makkemal/FreeCAD.git master
git status # still on your new master
git branch -D tmp # delete your temporary branch
??Already on 'master'
Your branch and 'fcmaster/master' have diverged,
and have 1 and 47 different commits each, respectively.
(use "git pull" to merge the remote branch into yours)
makke@makke-17-ubuntu:~/Freecad/fc_source$ git pull
error: Your local changes to the following files would be overwritten by merge:
src/Mod/Fem/FemTools.py
src/Mod/Fem/InitGui.py
src/Mod/Fem/ccxInpWriter.py
Please, commit your changes or stash them before you can merge.
Aborting
Code: Select all
git status
git branch
git branch -a
makke@makke-17-ubuntu:~/Freecad/fc_source$ git status
On branch master
Your branch and 'fcmaster/master' have diverged,
and have 1 and 47 different commits each, respectively.
(use "git pull" to merge the remote branch into yours)
Changes to be committed:
(use "git reset HEAD <file>..." to unstage)
modified: src/App/PropertyStandard.h
modified: src/Gui/DlgActionsImp.cpp
modified: src/Gui/FileDialog.cpp
modified: src/Gui/FileDialog.h
modified: src/Mod/Arch/Resources/ui/preferences-ifc.ui
modified: src/Mod/Arch/importIFC.py
modified: src/Mod/Fem/App/AppFem.cpp
modified: src/Mod/Fem/App/FemAnalysis.cpp
modified: src/Mod/Fem/App/FemAnalysis.h
modified: src/Mod/Fem/FemBeamSection.py
modified: src/Mod/Fem/FemShellThickness.py
modified: src/Mod/Fem/FemTools.py
modified: src/Mod/Fem/Gui/AppFemGui.cpp
modified: src/Mod/Fem/Gui/DlgSettingsFem.ui
modified: src/Mod/Fem/Gui/DlgSettingsFemImp.cpp
modified: src/Mod/Fem/InitGui.py
modified: src/Mod/Fem/MechanicalMaterial.py
modified: src/Mod/Fem/TestFem.py
modified: src/Mod/Fem/_FemAnalysis.py
modified: src/Mod/Fem/_JobControlTaskPanel.py
modified: src/Mod/Fem/_ResultControlTaskPanel.py
modified: src/Mod/Fem/ccxFrdReader.py
modified: src/Mod/Fem/ccxInpWriter.py
modified: src/Mod/Fem/test_files/cube_frequency.inp
modified: src/Mod/Fem/test_files/cube_static.inp
modified: src/Mod/Fem/test_files/static_analysis.inp
modified: src/Mod/OpenSCAD/OpenSCADFeatures.py
modified: src/Mod/ReverseEngineering/App/AppReverseEngineering.cpp
deleted: src/Mod/ReverseEngineering/App/AppReverseEngineeringPy.cpp
modified: src/Mod/ReverseEngineering/App/ApproxSurface.cpp
modified: src/Mod/ReverseEngineering/App/ApproxSurface.h
modified: src/Mod/ReverseEngineering/App/CMakeLists.txt
modified: src/Mod/ReverseEngineering/App/SurfaceTriangulation.cpp
modified: src/Mod/ReverseEngineering/App/SurfaceTriangulation.h
modified: src/Mod/ReverseEngineering/Gui/AppReverseEngineeringGui.cpp
deleted: src/Mod/ReverseEngineering/Gui/AppReverseEngineeringGuiPy.cpp
modified: src/Mod/ReverseEngineering/Gui/CMakeLists.txt
modified: src/Mod/Sketcher/App/Sketch.cpp
modified: src/Mod/Sketcher/App/SketchObject.cpp
modified: src/Mod/Sketcher/App/SketchObject.h
modified: src/Mod/Sketcher/App/SketchObjectPyImp.cpp
modified: src/Mod/Sketcher/App/planegcs/GCS.h
modified: src/Mod/Sketcher/Gui/ViewProviderSketch.cpp
modified: src/Mod/Spreadsheet/CMakeLists.txt
modified: src/Tools/_TEMPLATE_/App/App_TEMPLATE_.cpp
deleted: src/Tools/_TEMPLATE_/App/App_TEMPLATE_Py.cpp
modified: src/Tools/_TEMPLATE_/App/CMakeLists.txt
modified: src/Tools/_TEMPLATE_/Gui/App_TEMPLATE_Gui.cpp
deleted: src/Tools/_TEMPLATE_/Gui/App_TEMPLATE_GuiPy.cpp
modified: src/Tools/_TEMPLATE_/Gui/CMakeLists.txt
Untracked files:
(use "git add <file>..." to include in what will be committed)
src/Mod/Fem/FemTools.py.orig
src/Mod/Fem/InitGui.py.orig
src/Mod/Fem/ccxInpWriter.py.orig
makke@makke-17-ubuntu:~/Freecad/fc_source$ git branch
* master
predeformation
predeformation2
makke@makke-17-ubuntu:~/Freecad/fc_source$ git branch -a
* master
predeformation
predeformation2
remotes/fcmaster/master
remotes/fcmaster/releases/FreeCAD-0-13
remotes/fcmaster/releases/FreeCAD-0-14
remotes/fcmaster/releases/FreeCAD-0-15
remotes/origin/HEAD -> origin/master
remotes/origin/master
remotes/origin/predeformation
remotes/origin/predeformation2
remotes/origin/releases/FreeCAD-0-13
remotes/origin/releases/FreeCAD-0-14
remotes/origin/releases/FreeCAD-0-15
makke@makke-17-ubuntu:~/Freecad/fc_source$
Code: Select all
cd ~/Freecad/fc_source
git checkout -b origpyfiles
git add . # do not forget the little dot :-)
git commit -m "original python files"
git status # you should be on branch origfiles and nothing is to commit
Code: Select all
git checkout master
git log -5 --oneline
The version I am trying to commit too is e7a3dc4makke@makke-17-ubuntu:~/Freecad/fc_source$ git checkout master
Switched to branch 'master'
Your branch and 'fcmaster/master' have diverged,
and have 1 and 47 different commits each, respectively.
(use "git pull" to merge the remote branch into yours)
makke@makke-17-ubuntu:~/Freecad/fc_source$ git log -5 --oneline
c8a599c Precribed displacement constraint
e7a3dc4 + support of Python feature classes without an execute() method + if execute() method of Python featur
169b2e3 + clean-up, fix and new methods added in unit test module
28abf35 FEM: remove comment lines for _CommandNewMechanicalAnalysis.py
ffdc7a4 FEM: change purge_results to operate on analysis document
Code: Select all
Hash: e7a3dc48e834591e5553d5c37ef997e70d177a94
Hopefully doing all the stuff 10 times helped yourself to get into git and at the end you understood what you did.makkemal wrote:Holding thumbs I got it right now, I redid everything about 10 times
https://github.com/makkemal/FreeCAD/tree/predeformation