Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7829159
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T10:38:45+00:00 2026-06-02T10:38:45+00:00

I’m using Fabric to run an ANT task & then upload to GitHub. The

  • 0

I’m using Fabric to run an ANT task & then upload to GitHub. The script has worked, but not consistently so its difficult to understand why.

I’ve been reading on here that the process in Fabric is;

  1. git add
  2. git commit
  3. git push

But I keep seeing this output;

# On branch master
# Your branch is ahead of 'origin/master' by 1 commit.
#
nothing to commit (working directory clean)

Fatal error: local() encountered an error (return code 1) while executing 'git commit -m "Latest Selenium screenshots for View Employee"'

Aborting.

The function I’ve written looks like this;

def deploy():
    process = test()
    os.chdir('\\Documents and Settings\markw\GitTest')
    with cd('\\Documents and Settings\markw\GitTest'):
        local('git reset --soft HEAD')
        local('git pull origin master')
        local('git add -A')
        local('git commit -m "Latest Selenium screenshots for %s"' % (process))
        local('git push -u origin master')

What am I missing with my commit that causes a problem here? Is there another flag to combine commits that have queued up?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T10:38:46+00:00Added an answer on June 2, 2026 at 10:38 am

    There are no files to commit, so git is returning a non-zero error code. This leads fabric to believe that the previous command failed, so it aborts.

    To be honest, unless you’re absolutely certain that git is mistaken, and there are changes to commit, then I’m tempted to believe that your script is not actually malfunctioning at all.

    If you’re certain there are files to commit, you should investigate why the changes aren’t being picked up.

    If you’d like fabric to exit in a more friendly way, you can try something like this:

    from fabric.api import settings
    import sys
    
    def deploy():
        process = test()
        os.chdir('\\Documents and Settings\markw\GitTest')
        with cd('\\Documents and Settings\markw\GitTest'):
            with settings(warn_only=True):
                local('git reset --soft HEAD')
                local('git pull origin master')
                local('git add -A')
                commit = local('git commit -a -m "Latest Selenium screenshots for %s"' % (process))
                if commit.failed:
                    print 'Nothing to commit, exiting...'
                    sys.exit(0)
                else:
                    local('git push -u origin master')
    

    I’ve also added a -a to your git commit line, so it’s also committing changes as well as added files.

    Also, I’m not sure of the point of your os.chdir() line.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
That's pretty much it. I'm using Nokogiri to scrape a web page what has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I want to count how many characters a certain string has in PHP, but
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I am using Paperclip to handle profile photo uploads in my app. They upload
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
I am reading a book about Javascript and jQuery and using one of the
I've got a string that has curly quotes in it. I'd like to replace
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.