Tag: git

git revert remove commit

I am interested in reverting a pushed commit but also removing it from the graph. E.g. I have: tag A <— B <— C <— D <— E <— F HEAD I would like to remove F completely so my graph looks like: tag A <— B <— C <— D <— E HEAD How […]

Can I use command line to set developer verified for gerrit server changes

I have been tasked to write a tool that queries open changes for a given git projects. Next it uses the tip of tree and the open changes to create a build and test. And if build and testing goes fine then set a developer-verified on the change. By reading some available documentation I am […]

Git shallow clone specific version of remote repository

How can I clone a specific version of a certain branch of a remote repository? I’m working with a very large git tree (Linux Kernel, to be more specific). In many cases I need to bring the kernel code to a machine where network and file system are very limited. Usually I need to get […]

Git: add and commit if untracked or modified?

What is the most acceptable way in a Bash script to add and commit to a Git repository files that exist and are untracked or changed? git add -A “$dir” returns an error if the file does not exist, but returns 0 even if nothing was added. Then a subsequent git commit -m “Update $dir” […]

Designing better git branching model strategy

Brief overview We are product company and we are providing solutions to more than 50 clients and they are growing each month and we have fairly simple branching model which I would like to upgrade if possible. The model We are doing agile therefore we have sprints and releases. Each month or two we are […]

Proxy Issues with Install Module

Running the following setup: Server 2012 R2 PSVersion: 4.0 WSManStackVersion: 3.0 Git version 2.11.1 Package Management Preview – x64: 10.0.10586.117 SharpZipLib: 0.86.0 NuGet: 2.8.5.208 Trying to install the posh-git module gives: PowerShellGet\Install-Module posh-git -Scope CurrentUser But getting PackageManagement\Install-Package : No match was found for the specified search criteria and module name ‘posh-git’. When trying Get-PackageSource […]

Git bash keeps auto scrolling to the bottom of the window

I have installed multiple versions of git for windows, but every version I have tried so far acts the same. If I have a bunch of output lines in the terminal, scroll up to see some of the earlier outputs, the window will automatically take me back to the bottom at the prompt. It seems […]

Filter-branch filters out directory within subdirectory

I’m using following command to filter some subdirectory with its history: git filter-branch -f –prune-empty –subdirectory-filter path-to/subdir — –all where subdir has following hierarchy: subdir/ a/ b/ c/ The problem is, when the processing is finished while a and b is preserved, c is removed from history (and the whole directory is marked as new […]

Sharing SCSS Directory Across Projects

I am managing a project where I am using Patternlab to manage the front-end styles and components, but would also like to share its SCSS directory on another Angular project that is the actual application. Both are Git repos so my first thought was to use Git submodules, but being a Git novice I don’t […]

Git Rebase from Remote Master

This may have been asked before but I am a little confused on the terminology, so I am not sure what command(s) are the correct ones to accomplish what I need to accomplish. Right now I have a GitHub repository I am working from with my team. On there, I made a branch for a […]

Git Baby is a git and github fan, let's start git clone.