Automatic pull from the specific branch to my development environment server

Hai friends !

     I am new to git.Here i am setup git and create two branches namely local  and development branches.If i did any chenges from the local branch and then moved to development branch.So here i want to the changes should effect in my development server automatically.How to use hooks for this requirement.

I will give you the best prize if anybody clarify this task.

This post was moved to a different board that fits your topic of discussion a bit better. This means you’ll get better engagement on your post, and it keeps our Community organized so users can more easily find information.

As you’ll notice, your Topic is now in the How to use Git and GitHub board. No action is needed on your part; you can continue the conversation as normal here.

Hi @ramanayalakala,

Is there a specific reason you want to use hooks here, and can you clarify what sort of hooks are you looking to use? For example, GitHub webhooks versus pre- or post-commit hooks.

If you’re just looking to have local changes made available on your machine, you do not need the local branch here. The most viable option would be to adjust your workflow to look like this:

  1. Local changes are committed to the _development _branch

  2. This branch is then synced remotely with the same _development _branch on GitHub

  3. You then pull down these changes to your development server as necessary

  4. As appropriate, the _development _branch is merged into _master _branch when the code in _development _branch is production-ready.

This is known as the GitHub Flow and you can read more about how this development workflow operates in this help guide. I’d also recommend taking a look at GitHub Desktop which is a GUI to exercising git commands you’d usually run in a terminal. In addition, there’s an excellent guide to Git Basics which you can read here.

It’s likely that operating using the same development workflow mentioned above will be the easiest way forward.

​If there’s anything else I can help you with, let me know; so happy to help further!

Kindest regards,
Matthew

1 Like