Tag: git

git-review -> promote draft to code-review

I have created a Gerrit draft: git review -D Once I am done working on the draft, how do I create the code-review so it can eventually be merged to master? If I just do: git-review I get this output: $ git review remote: remote: Processing changes: refs: 1, done To ssh://jonbri@gerrit-foo.com:29418/fooProject ! [remote rejected] […]

Can't execute git command in nodejs

I can successfully execute git pull in linux command line on my VPS, but when I execute a bash file containing “git pull” with execFile in Nodejs, it gave me an error: Command failed: Host key verification failed. How can I solve this problem? Update: The whole error message I get is: { [Error: Command […]

Can't clone from Git on Vagrant box

$ git clone git@github.com:package/my-package.git my-project Cloning into ‘myproject’… ssh: connect to host github.com port 2222: Connection timed out fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists. I was able to do this until I created a 2nd Vagrant machine. I’ve since removed that […]

Why does git filter-branch tree-filter fail to rewrite commit but then leave working directory dirty?

I am attempting to revise a repo (not yet shared, so no worries about breaking anyone else’s history) and git filter-branch is behaving in a rather odd fashion. $ git filter-branch -f –tree-filter /path/to/fixup.sh cross-check Rewrite ae78489a98f2a9429c559833d8320d5f50a99903 (1/1)Hello? Hello? Goodbye WARNING: Ref ‘refs/heads/cross-check’ is unchanged The “Hello? Hello?” output is from the script, so I […]

git: different branch creation and merging techniques

git checkout -b some_branch master Is that equivalent to the statements: git checkout master git branch some_branch git checkout some_branch If not, then what is the difference? And in terms of merging: git checkout master git pull git pull origin some_branch Is that the same as: git checkout some_branch git pull git checkout master git […]

Putting version file into EAR or WAR using Maven

My firm is trying to find a way to put some type of version file or versioning on a EAR and or WAR using Maven. What we need is as we do the Maven Build is to take a version number out of a file and somehow put it into a EAR or WAR or […]

Specify the git branch for bower registry

I want to specify a branch name while doing bower register instead of bower defaulting the git branch to master. bower register mypackage git@gitlab.example.com:mypackage.git#branch but the above command doesn’t work. Thanks

Avoid ignoring a folder in git

I have a two directories named “static” in my project. One with the path “static/” and the other with a path “core/static/”. I want to gitignore the first static directory, but I want the “core/static” directory to be tracked. My current .gitignore file contains: static !core/static

how to take a backup of untracked files in the git

I have a situation wherein I have to take a huge list of un-tracked file and copy it to some backup folder. I know we can stash un-tracked file using git stash -u but I don’t want that. I just want it to be copied to local folder in filesystem. Is that possible ?

Restore local master after making commits on it

I have cloned a project from github. When I started to develop a new requirement, I forgot to make a new branch and I modified the code on my local master instead in a new branch. Now, I need to restore my local master, I mean, getting the same remote master code in my local […]

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