I'm new to bitbucket and git. I have a stage branch and a master branch. The stage branch is on my localhost, so I can instantly see changes I make to my website. I'd like to connect my master branch to a domain name or something. So when I type domain.com, that I can see my master branch. Is this possible?
Asked
Active
Viewed 66 times
1 Answers
0
You want to ssh into your domain and git clone your project, then whenever you are happy with a change that you have made locally, you can login to your server and do a git pull to pull in all of your changes. Should be simple enough as most hosting sites provide ssh access.

DrRoach
- 1,320
- 9
- 16
-
So I have do do this manually? Is there a way to automatically fetch the latest version of the master branch? – Nov 21 '14 at 10:52
-
You can use something like webhook http://www.webhook.com/ which you can use to automatically pull in your branches on a push, but to be honest, there's not much point in doing this as it only takes 2 minutes to log in to your sever and pull and you wont necessarily pull on every push as you may be half way through making adding a new feature for example – DrRoach Nov 21 '14 at 10:58
-
That's true, but logging in to the server requires like 3 passwords so I was hoping for some automated solution – Nov 21 '14 at 11:15
-
Do you have a tutorial or something that I can follow? – Nov 21 '14 at 11:20
-
I will have a look on the interwebs for you now – DrRoach Nov 21 '14 at 11:39
-
Thanks, I think I found my solution here: http://stackoverflow.com/questions/7927750/specify-an-ssh-key-for-git-push-for-a-given-domain. at least for connection to git. – Nov 21 '14 at 12:02
-
YOu may want to have a look at git hooks http://git-scm.com/docs/githooks may be your best chance – DrRoach Nov 21 '14 at 12:18