title: Git : Push to different remote branch
body: <h3>Problem:</h3>
  <p>Need to push the changes from local git branch to a different remote git repository branch and this changes pushed to the branch will be compared with the master existing in the remote URL and changes will get merged.</p>
  <h3>Steps</h3>
  <p>I have followed so far create a local git repository,</p>
  <p>Initialized  a simple local git repo using below using commands like below,</p>
  <pre><code> git init
  </code></pre>
  <p>Added existing files to the repo and get them added to the staging area using the below command,</p>
  <pre><code>MacBook-Pro: $ git add *.h
  MacBook-Pro: $ git add *.m
  </code></pre>
  <p>Checked the status using below command,</p>
  <pre><code>MacBook-Pro: $ git status
  
  # On branch master
  # Changes to be committed:
  #   (use &quot;git reset HEAD &lt;file&gt;...&quot; to unstage)
  #
  #   new file:   test.h
  #   new file:   test.m
  #
  </code></pre>
  <p>Committed them,</p>
  <pre><code>git commit -m&quot;Added test base files&quot;
  </code></pre>
  <p>Now created a new branch named issue_fix,</p>
  <pre><code>   MacBook-Pro:$ git branch issue_fix
  </code></pre>
  <p>Started working on the branch by checking out the branch.</p>
  <pre><code>MacBook-Pro: $ git checkout issue_fix
  </code></pre>
  <p>Made few commits to the branch. Everything was fine up to this.</p>
  <p>Now I'm in a situation where, I need to push the changes I made to my 'issue_fix' branch to a remote repository URL like this</p>
  <pre><code>    https://github.com/myaccountname/project.git
  </code></pre>
  <p>My Changes will get pushed to the branch name given to me or if the branch was not available I need to create a remote branch and push my changes in the local branch to that one.</p>
  <p>Most importantly pushed changes will be compared with the master in the given repository URL and if everything is fine it will get merged with the master. So I will be always pushing my changes from local to remote branch only.</p>
  <p>Problem occurred because Clone URL was not given when I started on this, only the source was provided so I created a local git repository and started working on that now the repository URL has been provided and asked to push my changes to a branch.</p>
  <p>I would like to know, is this possible in the first case?.If possible, give me the commands I need to give to get it working.</p>