Reputation: 13105
I'm a one-person IT department managing our company's website and recently recommended they have me set up version control. I've read all the tutorials and have heard everyone else's version of the best workflow, however, I'm starting with a humble setup until I can get this simple workflow operational.
Problem: After setting this up, The push and pull works fine (i.e. it presents no errors), but I don't actually see the changes show up either on my local machine or on the server.
Then, I cloned the remote repository via SSH to my local machine.
At this point, the files from my server show up in my local repository, no problem.
On my local machine, I added a branch to the repo called "development"
Pushed to the server.
At this point, the changes do not show up.
On the master branch on the server, I added a line to the html file, a random jumble of text.
Again, no errors. But the changes do not show up. The file on the server and on my local machine reflect the original contents and the respective changes I made on each one.
Upvotes: 2
Views: 116
Reputation: 410662
When you push into a remote repository, it only updates the repo's data -- the files don't get checked out/updated. You can solve this by adding a post-receive hook that runs git checkout -f
.
Upvotes: 1