Question: Hi I am writing aruby script to automate some git steps, for which I am using ruby-git : <https://github.com/schacon/ruby-git>.

I am able to clone, add and commit my changes but facing the issue while pushing the code changes to remote branch (git push origin ) .

Can anyone help me to push my changes via ruby-git

here is the code :

```
def initiate_git_clone
  path = $config['DbDir']
  git_repo_url = $config['GitRepo']
  git_repo_name = $config['GitRepoName']

  Dir.chdir(path)

  puts "\nStarting cloning : #{git_repo_name}"
  g = Git.clone(git_repo_url, git_repo_name, :path => path)
  puts "Clone completed : #{git_repo_name}"

  g.branch('test_branch')
  g.branch('test_branch').checkout

  update_metrics_status ('generating_schema')
end

def commit_and_push
  db_dir = $config['DbDir']
  git_repo_name = $config['GitRepoName']
  working_dir = db_dir + git_repo_name
  g = Git.open(working_dir)
  g.add
  g.commit('test commit')
  g.push(g.remote('origin'))
end

```

Answer: 
adding the solution here for other users that might find this question:
Use ng-bind-html to have angular display the html and run the content form the database thru the wpautop() function to get the correct format
It got it fixed by adding wpautop() function to the content in post array. The working code as shown below:

```
$post_array = array(
   'title'=>get_the_title(), 
   'permalink'=>get_the_permalink(), 
   'content'=>wpautop(get_the_content()), 
   'date'=>get_the_date(),
   'img'=>wp_get_attachment_url(get_post_thumbnail_id($post->ID), 'thumbnail')
);

```

and for controller 

```
app.controller("postController",function ($scope, $http, $sce){
  $scope.postsList = [];

  $http({
    method: "GET",    
    url: "http://localhost/wordpress/blog-posts/",
  }).then(function(response){
    console.log(response)
    $scope.postsList = response.data;
  });

  $scope.toTrustedHTML = function (RESOURCE_URL) {
    return $sce.trustAsHtml(RESOURCE_URL);
  };

});

```

and also we use ng-bind-html in index.html

```
 <article>
     <img ng-src="{{post.img}}" class="item">
     <h2 class="noWhitespace">{{post.title}}</h2>
     <p class="noWhitespace" ng-bind-html="toTrustedHTML(post.content)"></p> 
</article>

```

Thanks to victor for guiding me in the right way.