Reputation: 21015
I have a production server from some hosting company, so I can't put a git repository there.
I want to check the differences between my latest version in code to the prod server sources(its a php site).
I think that someone changed stuff at prod without update it in git. how can I check this stuff? And maybe merge the changes or something ?
Any guides suggestions ?
My version control is git, the site is a cakephp based site.
Upvotes: 3
Views: 90
Reputation: 1323953
Another alternative: copy all your remote file on your local machine, but outside your current working tree.
Type a:
git --work-tree=/path/to/ftp/copy --git-dir=/path/to/your/local/git/repo/.git status
That way you can detect what has changed without erasing anything on your initial working tree.
That being said, if you want to commit, having a clean state in your current working directory (as svick mentions in his answer, committing or stashing first is advisable.
Upvotes: 0
Reputation: 244767
Make sure you have clean repository (i.e. commit all your changes so that you don't lose them) and copy the code from the server to your local repository. You can then inspect the changes (using git diff
or gitk
) and commit them (or not).
Upvotes: 4
Reputation: 2811
you can switch to your branch and type in your shell
git status
or
git log
That should show your untracked files if they havent been added and/or committed.
gitk
You can use gitK to show a graphical representation of your changes and branches
Upvotes: 0