| 
        Motivation
       | 
      
        
       | 
    
  
  
    
      | 
        In-browser session
       | 
      
        
        
        Bitbucket is a service that uses git and provides functionality to collaborate with other people 
 
        
        We can browse the history of the contents of repositories and see who made which changes 
 
        
        Other platforms like Github look different by employ the same fundamentals 
 
        
         
       | 
    
  
  
    
      | 
        Configuring Git
       | 
      
        
       | 
    
  
  
    
      | 
        Our first repo
       | 
      
        
        
        Initializing a Git repository is simple: git init 
 
        
        Commits should be used to tell a story. 
 
        
        Git uses the .git folder to store the snapshots. 
 
        
         
       | 
    
  
  
    
      | 
        Undoing things
       | 
      
        
        
        Git history can be reverted without modifying it 
 
        
        Once changes are committed they are safe 
 
        
        Changes that are not committed can be deleted 
 
        
         
       | 
    
  
  
    
      | 
        Branching and merging
       | 
      
        
        
        A branch is a division unit of work, to be merged with other units of work. 
 
        
        A tag is a pointer to a moment in the history of a project. 
 
        
         
       | 
    
  
  
    
      | 
        Conflict resolution
       | 
      
        
       | 
    
  
  
    
      | 
        Sharing repositories online
       | 
      
        
        
        A repository can have one or multiple remotes 
 
        
        A remote serves as a full backup of your work. 
 
        
        git push sends local changes to the remote 
 
        
        git pull gets remote changes onto your local machine. 
 
        
        A remote allows other people to collaborate with you 
 
        
         
       | 
    
  
  
    
      | 
        Collaborating with git repositories
       | 
      
        
        
        Sharing a repository needs good communication 
 
        
        Branches are really necessary 
 
        
        Pull requests enable sensible merging of changes between branches and across repositories 
 
        
         
       | 
    
  
  
    
      | 
        Making git citable
       | 
      
        
        
        Git tags may be generated to note a particular version in history. 
 
        
        Consider use of git early in scientific workflows, for robust documentation 
 
        
        Open scientific work is more useful and more highly cited than closed. 
 
        
         
       | 
    
  
  
    
      | 
        What to not add to Git
       | 
      
        
        
        Git tags may be generated to note a particular version in history. 
 
        
        Consider use of git early in scientific workflows, for robust documentation 
 
        
        Open scientific work is more useful and more highly cited than closed. 
 
        
         
       |