How to exit a git merge asking for commit message?

press ESC >> Shift : wq

https://unix.stackexchange.com/questions/181280/how-to-exit-a-git-merge-asking-for-commit-message

Advertisements

Git clone into a non-empty directory?

We can do with the following steps that worked for me:

1st step: git init

// 2nd step: for https
git remote add origin https://username@bitbucket.org/username/repo.git

// OR

// 2nd step: for ssh
git remote add origin git@bitbucket.org:username/repo.git

3rd step: git fetch

4th step: git pull origin master

Another alternative but I did not try:

git init
git init add origin PATH/TO/REPO
git fetch
git reset origin/master
git checkout -t origin/master

Later I also tried this process and below is my problem and solution …

You might get the error “fatal: A branch named ‘master’ already exists.
Then it seems you are in the branch “master”. Then we can do the following extra steps to make it works…

#to add all the files except the untracked files
git add -u

# commit files from server to git
git commit -m “files from server to git”

# push all the files to git
git push origin master

After that you make lose some files on git since we pushed the files from server. In that case you may add the missing files later from vai server to git or vise versa.

For more: More explanation