Susan Potter

Git :: Version control system for code collaboration and history

software

Track diffs by scoping file, range, function, method, class changes

Discover the power of scoping change differentials in Git by focusing on specific files, line ranges, functions, methods, or classes. This article demonstrates various commands using the Ruby language repository, allowing developers to track changes in a particular semantic scope rather than at a file or directory level. Learn how to scope log diffs per file, identify diffs within a line range of a file, and limit change log noise by scoping diffs to named blocks in a file. …

software

Using three-way diffing context for merge conflict style in Git

It recently came to my attention that not everyone overrides the default merge.conflictStyle git-config setting. So in case anyone here wanted to try something new out that would provide more context during a Git conflict resolution scenario here you go. I use diff3 which you can set like this to override the default: git config --global merge.conflictStyle diff3 When rebasing you will get the following markers: <<<<<<< HEAD THIS IS SOME CODE ||||||| …

talks

Distributed Developer Workflows using Git

This meetup I will be walking the audience through how to setup, configure and maintain distributed development workflows using Git (the distributed VCS developers either love or hate). Much of the workflows suggested here will be applicable to other dVCSes like Mercurial, Darcs and Bazaar.

snippets

My .gitconfig & .tigrc files

This started as my first ~/.gitconfig file and is probably out of date when you read it. [user] name = Susan Potter # make sure you change this email = me@susanpotter.net # make sure you change this [color] diff = auto status = auto branch = auto [diff] rename = copy color = auto [apply] whitespace = strip [pager] color = true [status] color = auto [branch] autosetuprebase = always [alias] co = "checkout" ci = "commit" ciall = "commit -a -v" unmerge = …

software

SCM: The Next Generation

Have you heard of Darcs or Git? Many developers are familiar with traditional version control systems like Subversion and CVS, but the next generation of source control management will be distributed version control systems (DVCS) such as Darcs and Git. Darcs, written in Haskell, offers a user-friendly alternative to Git with some powerful features. In a recent experience using Darcs, the author found it pleasurable and efficient. As the need for concurrent work increases, …

git

How can I show only the files containing merge conflicts?

To show only the files containing merge conflicts in Git, you can use the git diff command with the --name-only and --diff-filter options. Here's the command you can use: git diff --name-only --diff-filter=U Explanation: --name-only: This option tells Git to output only the names of the files that have differences. --diff-filter=U: This option tells Git to show only files with unmerged, or conflicted changes. This command will output a list of file names that have …

git

How do I delete a branch in Git locally and globally?

To delete a Git branch locally and then remotely, you can follow these steps: Delete the local branch using the git branch command with the -d option: git branch -d <branch_name> This will delete the local branch named <branch_name>. If the branch has unmerged changes, Git will not allow you to delete the branch. In that case, you can use the -D option instead of -d to force delete the branch.

git

How to show the current branch name?

To know what branch you are currently on in Git, you can use the git branch command. When you run this command without any options, Git will show you a list of all the branches in your repository and indicate which one you are currently on. To see which branch you are currently on, run the following command in your Git repository: git branch The output will look something like this: