tom/git.py
def checkout(self, branch, new=False):
        """Checkout given branch, optionally creating it.
        Note that it's an error to create-and-checkout branch which already exists.
        """
        if new:
            self.run_command('checkout', '-b', branch)
        else:
            self.run_command('checkout', branch)
            self.run_command('reset', '--hard', 'origin/' + branch)
Checkout given branch, optionally creating it.
        Note that it's an error to create-and-checkout branch which already exists.
        
Checkout given branch, optionally creating it.
Note that it's an error to create-and-checkout branch which already exists.
Checkout given branch optionally creating it . Note that it ' s an error to create - and - checkout branch which already exists .
def checkout(self, branch, new=False):
        if new:
            self.run_command('checkout', '-b', branch)
        else:
            self.run_command('checkout', branch)
            self.run_command('reset', '--hard', 'origin/' + branch)
def checkout ( self , branch , new = False ) : if new : self . run_command ( 'checkout' , '-b' , branch ) else : self . run_command ( 'checkout' , branch ) self . run_command ( 'reset' , '--hard' , 'origin/' + branch )
Checkout given branch, optionally creating it.
Checkout given branch optionally creating it .
"""Checkout given branch, optionally creating it.
        Note that it's an error to create-and-checkout branch which already exists.
        """
self
branch
new