Set up github repository on new computer

I have a new mac. I've copied all of my files from my old computer into my new one, including my code base which happens to be slightly more up-to-date than what's on my github repo (I didn't do a final commit beforehand). Basically, I'm trying to pi...
more »

2017-03-19 05:03 (3) Answers

Extract meaningful changes with git diff

I'm trying to obtain changes between commits for a large number of HTML documents, but I quickly noticed that most changes are not important and are usually the result of logging, changes in versions to prevent caching or external scripts. For exampl...
more »

2017-03-19 02:03 (1) Answers

GIT: fatal: Not a git repository

I'm trying to add all my files from blog to git but I'm getting this error: fatal: Not a git repository: myBlog/crayon-syntax-highlighter/js/jquery-colorpicker/../../.git/modules/js/jquery-colorpicker I'm trying to add all the files like this: gi...
more »

2017-03-18 22:03 (1) Answers

Git: undo local changes

Very likely a duplicate - I found many questions about this. Anyway, none of the answers I read has been clear to me. My situation: I cloned a rep (source files for a kernel). Then checked out a branch, and built the kernel. The binaries have been s...
more »

2017-03-18 18:03 (3) Answers

Git Command Does not Work in Windows CMD

I am trying the below command in Windows CMD for Bitnami Gitlab VM machine at Windows 10. git clone git@192.168.1.10:user/project.git It works in Git Bash but the same command does not work for Windows CMD. I suspect when used in Windows CMD ssh ...
more »

2017-03-18 00:03 (2) Answers

How does GitHub know which account I am using?

I have two GitHub accounts, one is for my work and the other is for my personal use. I want to keep these two separate when I'm doing commits. Currently, I simply change my GitHub credentials when I can in different repositories on my local system b...
more »

2017-03-17 01:03 (2) Answers

Standalone git hooks or Jenkins?

I am trying to come up with the best solution for CI for a group of about 10 developers when it comes to testing a web interface. All I need is for a test suite to run when any of the devs push their code. I don't need to worry about building/compili...
more »

2017-03-16 22:03 (1) Answers

Why is Google Drive deleting my Git files?

I use a local Git repository (no remote version) for my personal projects. Everything gets synced to Google Drive, including Git files and directories. Yesterday I noticed that two classes had disappeared from my working copy. I used Git checkout to...
more »

2017-03-16 16:03 (1) Answers

git log: show second parent on the left

Consider this example git repository. #!/bin/bash -e rm -rf example git init example cd example echo 0 > file.txt git add file.txt git commit -am "initial commit" git branch branch1 echo 1 > file.txt git commit -am "1 (on master)" git branch b...
more »

2017-03-15 21:03 (3) Answers

git log two branches, ignoring others

Consider this example git repository. #!/bin/bash -e rm -rf example git init example cd example echo 0 > file.txt git add file.txt git commit -am "initial commit" git branch branch1 echo 1 > file.txt git commit -am "1 (on master)" git branch b...
more »

2017-03-15 21:03 (2) Answers

Get the latest commit in a repository with JGit

I want to get the last commit metadata (the youngest one by date) in a repository using JGit. I know that I can get the commit metadata using try (RevWalk walk = new RevWalk(repository)) { RevCommit commit = walk.parseCommit(repository.resolve...
more »

2017-03-15 21:03 (2) Answers

Is gradlew mandatory for travis CI to work?

I'm trying to setup CI for a project that I'm working on, and I'm wondering if we really need to commit the gradlew and/or the gradle.bat files to make it work. Is there a workaround for this, or committing those files is the only way? ...
more »

2017-03-15 19:03 (0) Answers

Git solution with multiple projects in C# .NET

I have a Visual Studio solution organized as follows: Solution - Company.ProjectName.People - Company.ProjectName.Books - Company.ProjectName.UI This goes on for something like 20 projects whitin this solution. Now, physically, these files r...
more »

2017-03-15 14:03 (1) Answers

Git - generate patch for all commits in a branch

How can I generate patch for all commits in a given branch by knowing only the branch name? This step is part of a complex workflow all of which is being automated. Hence requiring someone to manually determine the first commit in the branch is not...
more »

2017-03-15 05:03 (1) Answers