Git Notes for Professionals book

    Amazing collection of free programming books

    收集中
    免費
    Amazing collection of free programming books

    The Notes for Professionals book is compiled from Stack Overflow Documentation, the content is written by the beautiful people at Stack Overflow. Text content is released under Creative Commons BY-SA. See credits at the end of this book whom contributed to the various chapters. Images may be copyright of their respective owners unless otherwise specified

    Book created for educational purposes and is not affiliated with group(s), company(s) nor Stack Overflow. All trademarks belong to their respective company owners

    https://goalkicker.com/

    章節目錄

    1-1Content list
    1-2About
    1-3Chapter 1: Getting started with Git
    1-4Section 1.1: Create your first repository, then add and commit files
    1-5Section 1.2: Clone a repository
    1-6Section 1.3: Sharing code
    1-7Section 1.4: Setting your user name and email
    1-8Section 1.5: Setting up the upstream remote
    1-9Section 1.6: Learning about a command
    1-10Section 1.7: Set up SSH for Git
    1-11Section 1.8: Git Installation
    1-12Chapter 2: Browsing the history
    1-13Section 2.1: "Regular" Git Log
    1-14Section 2.2: Prettier log
    1-15Section 2.3: Colorize Logs
    1-16Section 2.4: Oneline log
    1-17Section 2.5: Log search
    1-18Section 2.6: List all contributions grouped by author name
    1-19Section 2.7: Searching commit string in git log
    1-20Section 2.8: Log for a range of lines within a file
    1-21Section 2.9: Filter logs
    1-22Section 2.10: Log with changes inline
    1-23Section 2.11: Log showing commited files
    1-24Section 2.12: Show the contents of a single commit
    1-25Section 2.13: Git Log Between Two Branches
    1-26Section 2.14: One line showing commiter name and time since commit
    1-27Chapter 3: Working with Remotes
    1-28Section 3.1: Deleting a Remote Branch
    1-29Section 3.2: Changing Git Remote URL
    1-30Section 3.3: List Existing Remotes
    1-31Section 3.4: Removing Local Copies of Deleted Remote Branches
    1-32Section 3.5: Updating from Upstream Repository
    1-33Section 3.6: ls-remote
    1-34Section 3.7: Adding a New Remote Repository
    1-35Section 3.8: Set Upstream on a New Branch
    1-36Section 3.9: Getting Started
    1-37Section 3.10: Renaming a Remote
    1-38Section 3.11: Show information about a Specific Remote
    1-39Section 3.12: Set the URL for a Specific Remote
    1-40Section 3.13: Get the URL for a Specific Remote
    1-41Section 3.14: Changing a Remote Repository
    1-42Chapter 4: Staging
    1-43Section 4.1: Staging All Changes to Files
    1-44Section 4.2: Unstage a file that contains changes
    1-45Section 4.3: Add changes by hunk
    1-46Section 4.4: Interactive add
    1-47Section 4.5: Show Staged Changes
    1-48Section 4.6: Staging A Single File
    1-49Section 4.7: Stage deleted files
    1-50Chapter 5: Ignoring Files and Folders
    1-51Section 5.1: Ignoring files and directories with a .gitignore file
    1-52Section 5.2: Checking if a file is ignored
    1-53Section 5.3: Exceptions in a .gitignore file
    1-54Section 5.4: A global .gitignore file
    1-55Section 5.5: Ignore files that have already been committed to a Git repository
    1-56Section 5.6: Ignore files locally without committing ignore rules
    1-57Section 5.7: Ignoring subsequent changes to a file (without removing it)
    1-58Section 5.8: Ignoring a file in any directory
    1-59Section 5.9: Prefilled .gitignore Templates
    1-60Section 5.10: Ignoring files in subfolders (Multiple gitignore files)
    1-61Section 5.11: Create an Empty Folder
    1-62Section 5.12: Finding files ignored by .gitignore
    1-63Section 5.13: Ignoring only part of a file [stub]
    1-64Section 5.14: Ignoring changes in tracked files. [stub]
    1-65Section 5.15: Clear already committed files, but included in .gitignore
    1-66Chapter 6: Git Di
    1-67Section 6.1: Show dierences in working branch
    1-68Section 6.2: Show changes between two commits
    1-69Section 6.3: Show dierences for staged files
    1-70Section 6.4: Comparing branches
    1-71Section 6.5: Show both staged and unstaged changes
    1-72Section 6.6: Show dierences for a specific file or directory
    1-73Section 6.7: Viewing a word-di for long lines
    1-74Section 6.8: Show dierences between current version and last version
    1-75Section 6.9: Produce a patch-compatible di
    1-76Section 6.10: dierence between two commit or branch
    1-77Section 6.11: Using meld to see all modifications in the working directory
    1-78Section 6.12: Di UTF-16 encoded text and binary plist files
    1-79Chapter 7: Undoing
    1-80Section 7.1: Return to a previous commit
    1-81Section 7.2: Undoing changes
    1-82Section 7.3: Using reflog
    1-83Section 7.4: Undoing merges
    1-84Section 7.5: Revert some existing commits
    1-85Section 7.6: Undo / Redo a series of commits
    1-86Chapter 8: Merging
    1-87Section 8.1: Automatic Merging
    1-88Section 8.2: Finding all branches with no merged changes
    1-89Section 8.3: Aborting a merge
    1-90Section 8.4: Merge with a commit
    1-91Section 8.5: Keep changes from only one side of a merge
    1-92Section 8.6: Merge one branch into another
    1-93Chapter 9: Submodules
    1-94Section 9.1: Cloning a Git repository having submodules
    1-95Section 9.2: Updating a Submodule
    1-96Section 9.3: Adding a submodule
    1-97Section 9.4: Setting a submodule to follow a branch
    1-98Section 9.5: Moving a submodule
    1-99Section 9.6: Removing a submodule
    1-100Chapter 10: Committing
    1-101Section 10.1: Stage and commit changes
    1-102Section 10.2: Good commit messages
    1-103Section 10.3: Amending a commit
    1-104Section 10.4: Committing without opening an editor
    1-105Section 10.5: Committing changes directly
    1-106Section 10.6: Selecting which lines should be staged for committing
    1-107Section 10.7: Creating an empty commit
    1-108Section 10.8: Committing on behalf of someone else
    1-109Section 10.9: GPG signing commits
    1-110Section 10.10: Commiting changes in specific files
    1-111Section 10.11: Committing at a specific date
    1-112Section 10.12: Amending the time of a commit
    1-113Section 10.13: Amending the author of a commit
    1-114Chapter 11: Aliases
    1-115Section 11.1: Simple aliases
    1-116Section 11.2: List / search existing aliases
    1-117Section 11.3: Advanced Aliases
    1-118Section 11.4: Temporarily ignore tracked files
    1-119Section 11.5: Show pretty log with branch graph
    1-120Section 11.6: See which files are being ignored by your .gitignore configuration
    1-121Section 11.7: Updating code while keeping a linear history
    1-122Section 11.8: Unstage staged files
    1-123Chapter 12: Rebasing
    1-124Section 12.1: Local Branch Rebasing
    1-125Section 12.2: Rebase: ours and theirs, local and remote
    1-126Section 12.3: Interactive Rebase
    1-127Section 12.4: Rebase down to the initial commit
    1-128Section 12.5: Configuring autostash
    1-129Section 12.6: Testing all commits during rebase
    1-130Section 12.7: Rebasing before a code review
    1-131Section 12.8: Aborting an Interactive Rebase
    1-132Section 12.9: Setup git-pull for automatically perform a rebase instead of a merge
    1-133Section 12.10: Pushing after a rebase
    1-134Chapter 13: Configuration
    1-135Section 13.1: Setting which editor to use
    1-136Section 13.2: Auto correct typos
    1-137Section 13.3: List and edit the current configuration
    1-138Section 13.4: Username and email address
    1-139Section 13.5: Multiple usernames and email address
    1-140Section 13.6: Multiple git configurations
    1-141Section 13.7: Configuring line endings
    1-142Section 13.8: configuration for one command only
    1-143Section 13.9: Setup a proxy
    1-144Chapter 14: Branching
    1-145Section 14.1: Creating and checking out new branches
    1-146Section 14.2: Listing branches
    1-147Section 14.3: Delete a remote branch
    1-148Section 14.4: Quick switch to the previous branch
    1-149Section 14.5: Check out a new branch tracking a remote branch
    1-150Section 14.6: Delete a branch locally
    1-151Section 14.7: Create an orphan branch (i.e. branch with no parent commit)
    1-152Section 14.8: Rename a branch
    1-153Section 14.9: Searching in branches
    1-154Section 14.10: Push branch to remote
    1-155Section 14.11: Move current branch HEAD to an arbitrary commit
    1-156Chapter 15: Rev-List
    1-157Section 15.1: List Commits in master but not in origin/master
    1-158Chapter 16: Squashing
    1-159Section 16.1: Squash Recent Commits Without Rebasing
    1-160Section 16.2: Squashing Commit During Merge
    1-161Section 16.3: Squashing Commits During a Rebase
    1-162Section 16.4: Autosquashing and fixups
    1-163Section 16.5: Autosquash: Committing code you want to squash during a rebase
    1-164Chapter 17: Cherry Picking
    1-165Section 17.1: Copying a commit from one branch to another
    1-166Section 17.2: Copying a range of commits from one branch to another
    1-167Section 17.3: Checking if a cherry-pick is required
    1-168Section 17.4: Find commits yet to be applied to upstream
    1-169Chapter 18: Recovering
    1-170Section 18.1: Recovering from a reset
    1-171Section 18.2: Recover from git stash
    1-172Section 18.3: Recovering from a lost commit
    1-173Section 18.4: Restore a deleted file after a commit
    1-174Section 18.5: Restore file to a previous version
    1-175Section 18.6: Recover a deleted branch
    1-176Chapter 19: Git Clean
    1-177Section 19.1: Clean Interactively
    1-178Section 19.2: Forcefully remove untracked files
    1-179Section 19.3: Clean Ignored Files
    1-180Section 19.4: Clean All Untracked Directories
    1-181Chapter 20: Using a .gitattributes file
    1-182Section 20.1: Automatic Line Ending Normalization
    1-183Section 20.2: Identify Binary Files
    1-184Section 20.3: Prefilled .gitattribute Templates
    1-185Section 20.4: Disable Line Ending Normalization
    1-186Chapter 21: .mailmap file: Associating contributor and email aliases
    1-187Section 21.1: Merge contributers by aliases to show commit count in shortlog
    1-188Chapter 22: Analyzing types of workflows
    1-189Section 22.1: Centralized Workflow
    1-190Section 22.2: Gitflow Workflow
    1-191Section 22.3: Feature Branch Workflow
    1-192Section 22.4: GitHub Flow
    1-193Section 22.5: Forking Workflow
    1-194Chapter 23: Pulling
    1-195Section 23.1: Pulling changes to a local repository
    1-196Section 23.2: Updating with local changes
    1-197Section 23.3: Pull, overwrite local
    1-198Section 23.4: Pull code from remote
    1-199Section 23.5: Keeping linear history when pulling
    1-200Section 23.6: Pull, "permission denied"
    1-201Chapter 24: Hooks
    1-202Section 24.1: Pre-push
    1-203Section 24.2: Verify Maven build (or other build system) before committing
    1-204Section 24.3: Automatically forward certain pushes to other repositories
    1-205Section 24.4: Commit-msg
    1-206Section 24.5: Local hooks
    1-207Section 24.6: Post-checkout
    1-208Section 24.7: Post-commit
    1-209Section 24.8: Post-receive
    1-210Section 24.9: Pre-commit
    1-211Section 24.10: Prepare-commit-msg
    1-212Section 24.11: Pre-rebase
    1-213Section 24.12: Pre-receive
    1-214Section 24.13: Update
    1-215Chapter 25: Cloning Repositories
    1-216Section 25.1: Shallow Clone
    1-217Section 25.2: Regular Clone
    1-218Section 25.3: Clone a specific branch
    1-219Section 25.4: Clone recursively
    1-220Section 25.5: Clone using a proxy
    1-221Chapter 26: Stashing
    1-222Section 26.1: What is Stashing?
    1-223Section 26.2: Create stash
    1-224Section 26.3: Apply and remove stash
    1-225Section 26.4: Apply stash without removing it
    1-226Section 26.5: Show stash
    1-227Section 26.6: Partial stash
    1-228Section 26.7: List saved stashes
    1-229Section 26.8: Move your work in progress to another branch
    1-230Section 26.9: Remove stash
    1-231Section 26.10: Apply part of a stash with checkout
    1-232Section 26.11: Recovering earlier changes from stash
    1-233Section 26.12: Interactive Stashing
    1-234Section 26.13: Recover a dropped stash
    1-235Chapter 27: Subtrees
    1-236Section 27.1: Create, Pull, and Backport Subtree
    1-237Chapter 28: Renaming
    1-238Section 28.1: Rename Folders
    1-239Section 28.2: rename a local and the remote branch
    1-240Section 28.3: Renaming a local branch
    1-241Chapter 29: Pushing
    1-242Section 29.1: Push a specific object to a remote branch
    1-243Section 29.2: Push
    1-244Section 29.3: Force Pushing
    1-245Section 29.4: Push tags
    1-246Section 29.5: Changing the default push behavior
    1-247Chapter 30: Internals
    1-248Section 30.1: Repo
    1-249Section 30.2: Objects
    1-250Section 30.3: HEAD ref
    1-251Section 30.4: Refs
    1-252Section 30.5: Commit Object
    1-253Section 30.6: Tree Object
    1-254Section 30.7: Blob Object
    1-255Section 30.8: Creating new Commits
    1-256Section 30.9: Moving HEAD
    1-257Section 30.10: Moving refs around
    1-258Section 30.11: Creating new Refs
    1-259Chapter 31: git-tfs
    1-260Section 31.1: git-tfs clone
    1-261Section 31.2: git-tfs clone from bare git repository
    1-262Section 31.3: git-tfs install via Chocolatey
    1-263Section 31.4: git-tfs Check In
    1-264Section 31.5: git-tfs push
    1-265Chapter 32: Empty directories in Git
    1-266Section 32.1: Git doesn't track directories
    1-267Chapter 33: git-svn
    1-268Section 33.1: Cloning the SVN repository
    1-269Section 33.2: Pushing local changes to SVN
    1-270Section 33.3: Working locally
    1-271Section 33.4: Getting the latest changes from SVN
    1-272Section 33.5: Handling empty folders
    1-273Chapter 34: Archive
    1-274Section 34.1: Create an archive of git repository
    1-275Section 34.2: Create an archive of git repository with directory prefix
    1-276Section 34.3: Create archive of git repository based on specific branch, revision, tag or directory
    1-277Chapter 35: Rewriting history with filter-branch
    1-278Section 35.1: Changing the author of commits
    1-279Section 35.2: Setting git committer equal to commit author
    1-280Chapter 36: Migrating to Git
    1-281Section 36.1: SubGit
    1-282Section 36.2: Migrate from SVN to Git using Atlassian conversion utility
    1-283Section 36.3: Migrating Mercurial to Git
    1-284Section 36.4: Migrate from Team Foundation Version Control (TFVC) to Git
    1-285Section 36.5: Migrate from SVN to Git using svn2git
    1-286Chapter 37: Show
    1-287Section 37.1: Overview
    1-288Chapter 38: Resolving merge conflicts
    1-289Section 38.1: Manual Resolution
    1-290Chapter 39: Bundles
    1-291Section 39.1: Creating a git bundle on the local machine and using it on another
    1-292Chapter 40: Display commit history graphically with Gitk
    1-293Section 40.1: Display commit history for one file
    1-294Section 40.2: Display all commits between two commits
    1-295Section 40.3: Display commits since version tag
    1-296Chapter 41: Bisecting/Finding faulty commits
    1-297Section 41.1: Binary search (git bisect)
    1-298Section 41.2: Semi-automatically find a faulty commit
    1-299Chapter 42: Blaming
    1-300Section 42.1: Only show certain lines
    1-301Section 42.2: To find out who changed a file
    1-302Section 42.3: Show the commit that last modified a line
    1-303Section 42.4: Ignore whitespace-only changes
    1-304Chapter 43: Git revisions syntax
    1-305Section 43.1: Specifying revision by object name
    1-306Section 43.2: Symbolic ref names: branches, tags, remote-tracking branches
    1-307Section 43.3: The default revision: HEAD
    1-308Section 43.4: Reflog references: <refname>@{<n>}
    1-309Section 43.5: Reflog references: <refname>@{<date>}
    1-310Section 43.6: Tracked / upstream branch: <branchname>@{upstream}
    1-311Section 43.7: Commit ancestry chain: <rev>^, <rev>~<n>, etc
    1-312Section 43.8: Dereferencing branches and tags: <rev>^0, <rev>^{<type>}
    1-313Section 43.9: Youngest matching commit: <rev>^{/<text>}, :/<text>
    1-314Chapter 44: Worktrees
    1-315Section 44.1: Using a worktree
    1-316Section 44.2: Moving a worktree
    1-317Chapter 45: Git Remote
    1-318Section 45.1: Display Remote Repositories
    1-319Section 45.2: Change remote url of your Git repository
    1-320Section 45.3: Remove a Remote Repository
    1-321Section 45.4: Add a Remote Repository
    1-322Section 45.5: Show more information about remote repository
    1-323Section 45.6: Rename a Remote Repository
    1-324Chapter 46: Git Large File Storage (LFS)
    1-325Section 46.1: Declare certain file types to store externally
    1-326Section 46.2: Set LFS config for all clones
    1-327Section 46.3: Install LFS
    1-328Chapter 47: Git Patch
    1-329Section 47.1: Creating a patch
    1-330Section 47.2: Applying patches
    1-331Chapter 48: Git statistics
    1-332Section 48.1: Lines of code per developer
    1-333Section 48.2: Listing each branch and its last revision's date
    1-334Section 48.3: Commits per developer
    1-335Section 48.4: Commits per date
    1-336Section 48.5: Total number of commits in a branch
    1-337Section 48.6: List all commits in pretty format
    1-338Section 48.7: Find All Local Git Repositories on Computer
    1-339Section 48.8: Show the total number of commits per author
    1-340Chapter 49: git send-email
    1-341Section 49.1: Use git send-email with Gmail
    1-342Section 49.2: Composing
    1-343Section 49.3: Sending patches by mail
    1-344Chapter 50: Git GUI Clients
    1-345Section 50.1: gitk and git-gui
    1-346Section 50.2: GitHub Desktop
    1-347Section 50.3: Git Kraken
    1-348Section 50.4: SourceTree
    1-349Section 50.5: Git Extensions
    1-350Section 50.6: SmartGit
    1-351Chapter 51: Reflog - Restoring commits not shown in git log
    1-352Section 51.1: Recovering from a bad rebase
    1-353Chapter 52: TortoiseGit
    1-354Section 52.1: Squash commits
    1-355Section 52.2: Assume unchanged
    1-356Section 52.3: Ignoring Files and Folders
    1-357Section 52.4: Branching
    1-358Chapter 53: External merge and ditools
    1-359Section 53.1: Setting up KDi3 as merge tool
    1-360Section 53.2: Setting up KDi3 as di tool
    1-361Section 53.3: Setting up an IntelliJ IDE as merge tool (Windows)
    1-362Section 53.4: Setting up an IntelliJ IDE as di tool (Windows)
    1-363Section 53.5: Setting up Beyond Compare
    1-364Chapter 54: Update Object Name in Reference
    1-365Section 54.1: Update Object Name in Reference
    1-366Chapter 55: Git Branch Name on Bash Ubuntu
    1-367Section 55.1: Branch Name in terminal
    1-368Chapter 56: Git Client-Side Hooks
    1-369Section 56.1: Git pre-push hook
    1-370Section 56.2: Installing a Hook
    1-371Chapter 57: Git rerere
    1-372Section 57.1: Enabling rerere
    1-373Chapter 58: Change git repository name
    1-374Section 58.1: Change local setting
    1-375Chapter 59: Git Tagging
    1-376Section 59.1: Listing all available tags
    1-377Section 59.2: Create and push tag(s) in GIT
    1-378Chapter 60: Tidying up your local and remote repository
    1-379Section 60.1: Delete local branches that have been deleted on the remote
    1-380Chapter 61: di-tree
    1-381Section 61.1: See the files changed in a specific commit
    1-382Section 61.2: Usage
    1-383Section 61.3: Common di options
    1-384Credits
    1-385You may also like

    常見問答

    您可以透過手機、平板或是電腦登入 HiSKIO 平台,在【我的學習】>【我的書籍】頁面,選擇想看的電子書。

    猜你喜歡

    用戶評價

    | 收集中

    銷售方案