I am learning Git
I have a website hosted on godaddy. Using 'Git Bash' tool, I initialized it into a git repo by using git init
.
THIS IS WHAT I DID (in detail)
Using Git Bash, I SSH into the remote godaddy servers as below
SSH my-user-name@177.62.28.96
, and then ran the following git commands to initialize the existing files as a git repo.
git init
, git add *
git commit
...
Now this is named as master
branch of the repo.
THIS IS WHAT I WANT TO DO
I want to pull this git repo to a local folder, make changes and then git push
it back.
THIS QUESTION IS OPENED AGAIN (here is why)
It is because answer by @dendress suggests that one should initialize the remote repo as bare
. Problem with this answer is that though it pushes successfully, but the changes are not reflected on the remote files.
TO SOLVE THIS IS WHAT I DID
Docs suggest that in a bare
repo there is no working tree. so changes can't be reflected. so what I did was
- I removed the
.git/
folder, - re-initialized the directory with
git init
, - cloned it in my local machine using
git clone my-user-name@177.62.28.96
and made changes - on server, I changed the repo to bare by
git config --bool core.config true
- from my local machine, I ran
git push origin master
- here is the output of it
Pareek@ram MINGW64 /c/wamp/www/git/sarv/sarv (master)
$ git push origin master
pareekbhagu@177.62.28.96's password:
Counting objects: 5, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (5/5), done.
Writing objects: 100% (5/5), 442 bytes | 0 bytes/s, done.
Total 5 (delta 4), reused 0 (delta 0)
To pareekbhagu@166.62.28.96:
8d4041d..7906308 master -> master
I think this means the push is successful, but **
How do I make the changes reflect on my remote repo
**