0

My company has a boilerplate theme we use as a starting point for each project hosted on github. Here's what im stuck on at the moment:

  1. git clone [github url] onto staging server
  2. git clone [staging url] onto local machine
  3. make changes locally
  4. git commit/push (using smartGit on local machine)

changes to the file dont appear on staging server

if i run 'git status' on staging server, i can see the file is 'modified' but i dont want to push that to my github. i want this code to be publicly visible.

CharlesB
  • 86,532
  • 28
  • 194
  • 218

1 Answers1

0

The issue you might see is that you're pushing to a non-bare repository. This means that the staging repository has a working copy, since you cloned it from another one, and Git disallow pushing changes to the current branch of remote repository that has a working copy.

This should have raised an error from git push operation, maybe you didn't pay attention to it?

To fix this, you'll want to change the staging repo to a bare one, and checkout the working copy to a different location on the server.

You can also look at deployment tools such as git-ftp. See also this page.

Community
  • 1
  • 1
CharlesB
  • 86,532
  • 28
  • 194
  • 218