Mastering Git attain expert-level proficiency with Git for enhanced productivity and efficient collaboration by mastering advanced distributed version control features
Attain expert-level proficiency with Git for enhanced productivity and efficient collaboration by mastering advanced distributed version control features About This Book Set up Git for solo and collaborative development Harness the full power of Git version control system to customize Git behavior,...
Otros Autores: | |
---|---|
Formato: | Libro electrónico |
Idioma: | Inglés |
Publicado: |
Birmingham, [England] ; Mumbai, [India] :
Packt
2016.
|
Edición: | 1st edition |
Colección: | Community experience distilled.
|
Materias: | |
Ver en Biblioteca Universitat Ramon Llull: | https://discovery.url.edu/permalink/34CSUC_URL/1im36ta/alma991009630180206719 |
Tabla de Contenidos:
- Cover
- Copyright
- Credits
- About the Author
- About the Reviewer
- www.PacktPub.com
- Table of Contents
- Preface
- Chapter 1: Git Basics in Practice
- An introduction to version control and Git
- Git by example
- Repository setup
- Creating a Git repository
- Cloning the repository and creating the first commit
- Publishing changes
- Examining history and viewing changes
- Renaming and moving files
- Updating your repository (with merge)
- Creating a tag
- Resolving a merge conflict
- Adding files in bulk and removing files
- Undoing changes to a file
- Creating a new branch
- Merging a branch (no conflicts)
- Undoing an unpublished merge
- Summary
- Chapter 2: Exploring Project History
- Directed Acyclic Graphs
- Whole-tree commits
- Branches and tags
- Branch points
- Merge commits
- Single revision selection
- HEAD - the implicit revision
- Branch and tag references
- SHA-1 and the shortened SHA-1 identifier
- Ancestry references
- Reverse ancestry references: the git describe output
- Reflog shortnames
- Upstream of remote-tracking branches
- Selecting revision by the commit message
- Selecting the revision range
- Single revision as a revision range
- Double dot notation
- Multiple points - including and excluding revisions
- The revision range for a single revision
- Triple-dot notation
- Searching history
- Limiting the number of revisions
- Matching revision metadata
- Time-limiting options
- Matching commit contents
- Commit parents
- Searching changes in revisions
- Selecting types of change
- History of a file
- Path limiting
- History simplification
- Blame - the line-wise history of a file
- Finding bugs with git bisect
- Selecting and formatting the git log output
- Predefined and user defined output formats
- Including, formatting, and summing up changes.
- Summarizing contributions
- Viewing a revision and a file at revision
- Summary
- Chapter 3: Developing with Git
- Creating a new commit
- The DAG view of creating a new commit
- The index - a staging area for commits
- Examining the changes to be committed
- The status of the working directory
- Examining differences from the last revision
- Unified Git diff format
- Selective commit
- Selecting files to commit
- Interactively selecting changes
- Creating a commit step by step
- Amending a commit
- Working with branches
- Creating a new branch
- Creating orphan branches
- Selecting and switching to a branch
- Obstacles to switching to a branch
- Anonymous branches
- Git checkout DWIM-mery
- Listing branches
- Rewinding or resetting a branch
- Deleting a branch
- Changing the branch name
- Summary
- Chapter 4: Managing Your Worktree
- Ignoring files
- Marking files as intentionally untracked
- Which types of file should be ignored?
- Listing ignored files
- Ignoring changes in tracked files
- File attributes
- Identifying binary files and end-of-line conversions
- Diff and merge configuration
- Generating diffs and binary files
- Configuring diff output
- Performing a 3-way merge
- Transforming files (content filtering)
- Obligatory file transformations
- Keyword expansion and substitution
- Other built-in attributes
- Defining attribute macros
- Fixing mistakes with the reset command
- Rewinding the branch head, softly
- Removing or amending a commit
- Squashing commits with reset
- Resetting the branch head and the index
- Splitting a commit with reset
- Saving and restoring state with the WIP commit
- Discarding changes and rewinding branch
- Moving commits to a feature branch
- Undoing a merge or a pull
- Safer reset - keeping your changes
- Rebase changes to an earlier revision.
- Stashing away your changes
- Using git stash
- Stash and the staging area
- Stash internals
- Un-applying a stash
- Recovering stashes that were dropped erroneously
- Managing worktrees and the staging area
- Examining files and directories
- Searching file contents
- Un-tracking, un-staging, and un-modifying files
- Resetting a file to the old version
- Cleaning the working area
- Multiple working directories
- Summary
- Chapter 5: Collaborative Development with Git
- Collaborative workflows
- Bare repositories
- Interacting with other repositories
- The centralized workflow
- The peer-to-peer or forking workflow
- The maintainer or integration manager workflow
- The hierarchical or dictator and lieutenants workflows
- Managing remote repositories
- The origin remote
- Listing and examining remotes
- Adding a new remote
- Updating information about remotes
- Renaming remotes
- Changing the remote URLs
- Changing the list of branches tracked by remote
- Setting the default branch of remote
- Deleting remote-tracking branches
- Support for triangular workflows
- Transport protocols
- Local transport
- Smart transports
- Native Git protocol
- SSH protocol
- Smart HTTP(S) protocol
- Offline transport with bundles
- Cloning and updating with bundle
- Using bundle to update an existing repository
- Utilizing bundle to help with the initial clone
- Remote transport helpers
- Transport relay with remote helpers
- Using foreign SCM repositories as remotes
- Credentials/password management
- Asking for passwords
- Public key authentication for SSH
- Credential helpers
- Publishing your changes upstream
- Pushing to a public repository
- Generating a pull request
- Exchanging patches
- Chain of trust
- Content-addressed storage
- Lightweight, annotated, and signed tags
- Lightweight tags.
- Annotated tags
- Signed tags
- Publishing tags
- Tag verification
- Signed commits
- Merging signed tags (merge tags)
- Summary
- Chapter 6: Advanced Branching Techniques
- Types and purposes of branches
- Long-running, perpetual branches
- Integration, graduation, or progressive-stability branches
- Per-release branches and per-release maintenance
- Hotfix branches for security fixes
- Per-customer or per-deployment branches
- Automation branches
- Mob branches for anonymous push access
- The orphan branch trick
- Short-lived branches
- Topic or feature branches
- Bugfix branches
- Detached HEAD - the anonymous branch
- Branching workflows and release engineering
- The release and trunk branches workflow
- The graduation, or progressive-stability branches workflow
- The topic branches workflow
- Graduation branches in a topic branch workflow
- Branch management for a release in a topic branch workflow
- Git-flow - a successful Git branching model
- Fixing a security issue
- Interacting with branches in remote repositories
- Upstream and downstream
- Remote-tracking branches and refspec
- Remote-tracking branches
- Refspec - remote to local branch mapping specification
- Fetching and pulling versus pushing
- Pull - fetch and update current branch
- Pushing to the current branch in a nonbare remote repository
- The default fetch refspec and push modes
- Fetching and pushing branches and tags
- Fetching branches
- Fetching tags and automatic tag following
- Pushing branches and tags
- Push modes and their use
- The simple push mode - the default
- The matching push mode for maintainers
- The upstream push mode for the centralized workflow
- The current push mode for the blessed repository workflow
- Summary
- Chapter 7: Merging Changes Together
- Methods of combining changes
- Merging branches.
- No divergence - fast-forward and up-to-date cases
- Creating a merge commit
- Merge strategies and their options
- Reminder - merge drivers
- Reminder - signing merges and merging tags
- Copying and applying a changeset
- Cherry-pick - creating a copy of a changeset
- Revert - undoing an effect of a commit
- Applying a series of commits from patches
- Cherry-picking and reverting a merge
- Rebasing a branch
- Merge versus rebase
- Types of rebase
- Advanced rebasing techniques
- Resolving merge conflicts
- The three-way merge
- Examining failed merges
- Conflict markers in the worktree
- Three stages in the index
- Examining differences - the combined diff format
- How do we get there: git log
- merge
- Avoiding merge conflicts
- Useful merge options
- Rerere - reuse recorded resolutions
- Dealing with merge conflicts
- Aborting a merge
- Selecting ours or theirs version
- Scriptable fixes - manual file remerging
- Using graphical merge tools
- Marking files as resolved and finalizing merges
- Resolving rebase conflicts
- git-imerge - incremental merge and rebase for git
- Summary
- Chapter 8: Keeping History Clean
- An introduction to Git internals
- Git objects
- The plumbing and porcelain Git commands
- Environment variables used by Git
- Environment variables affecting global behavior
- Environment variables affecting repository locations
- Environment variables affecting committing
- Rewriting history
- Amending the last commit
- An interactive rebase
- Reordering, removing, and fixing commits
- Squashing commits
- Splitting commits
- Testing each rebased commit
- External tools - patch management interfaces
- Scripted rewrite with the git filter-branch
- Running the filter-branch without filters
- Available filter types for filter-branch and their use
- Examples of using the git filter-branch.
- External tools for large-scale history rewriting.