I did git fetch
and git fetch --all
but there was no output for the same. after that when I do git pull again I get the below error again.
I am willing to fetch the origin from the remote to my local.
I even did this below but still there is an error.
[root@connect /myurl/fd-ansible]# git fetch origin master
Password:
From https://github.com/myurl/fd-ansible
* branch master -> FETCH_HEAD
[root@connect /myurl/fd-ansible]# git clean -df
[root@connect /myurl/fd-ansible]# git pull
Password:
Updating 8bf6b66..a0b2167
error: Your local changes to 'group_vars/system1' would be overwritten by merge. Aborting.
Please, commit your changes or stash them before you can merge.
Edited with @Stephen Kitt solution
[root@connect /myurl/fd-ansible]# git checkout group_vars/system1
[root@connect /myurl/fd-ansible]# git pull
Password:
Updating 8bf6b66..a0b2167
Fast-forward
cmdb/vm.csv | 118 +++++++++++++++++++++++++-------------------------
group_vars/system1 | 56 ++++++++++++++++++++++++
2 files changed, 115 insertions(+), 59 deletions(-)
git fetch
instead, not that that will fully resolve the situation—you need to understand Git to use it properly. Also, this question would do better on StackOverflow than here. – Wildcard Jan 11 '17 at 02:47git fetch
it was executed without any output. Does that mean it is done with the merge part. – AReddy Jan 11 '17 at 02:50