Note that there are some explanatory texts on larger screens.

plurals
  1. POGit - Synchronize and overwrite files from Bitbucket to remote server
    text
    copied!<p>I'm trying to synchronize a branch from Bitbucket to the same branch on the remote server machine. And to do this ignoring some files and directories.</p> <p>Now I try to explain me better. What I have done until now is to push the stable versions of my nodejs-app, from my local machine to Bitbucket. This works fine. Now I have the same branches as in local, and each one is a version of the app. I already pushed the files adding the file <code>.gitingore</code> at the root. So in Bitbucket there are the versions for every brunches.</p> <p>What I would like to do is synchronize the file no the remote server from Bitbucket.<br> So the first time, when on the remote server there was nothing, I used the command clone</p> <pre><code>git clone git@bitbucket.org:&lt;my_username&gt;/&lt;my_repo&gt;.git -b &lt;my_bitbucket_branch&gt; path/to/server/dir </code></pre> <p>After have done this, I updated from local to Bitbucket some files in a new branch called <code>my_bitbucket_branch</code>.</p> <p>The question is: <strong>what's the procedure to update/synchronize (and overwrite) the a specific <code>my_server_branch</code> with another specific <code>my_bitbucket_branch</code>, ignoring some dir/files?</strong></p> <p>At the end I would like to switch versions of the (online/remote) nodejs-app simply switch branch, like this</p> <pre><code>git checkout v01 git checkout v02 ... </code></pre> <p>I'm new to Git, hope it's clear. </p> <p><strong>ADD</strong></p> <p>I need something which update+override the branch not on the Bitbucket, not on my local-pc, but on my remote server (where there is the website in nodejs). I saw the "pull" command... maybe that?</p> <p>If I had on Bitbucket a branch called "v02" and on the remote server a branch called "v01", I want to override v01 with v02. So all the file in v01(on remote server) will be exactly equals in v02(on Bitbucket).</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload