Skip to main content

Posts

Showing posts with the label git

A Love for Sourcetree on Linux

There has been a long-standing hope that Atlassian Sourcetree will one day make it to the Linux platform.  The company has flatly refused to create a version for Linux , but that doesn't mean the interest isn't there. A search for the term "sourcetree" in the Atlassian Community renders a results set with an entry titled " SourceTree for Linux ."  Its view count is higher than any other entry in the results listing at more than a quarter of a million views.  That's more than any other entry, and it isn't even close. The listing https://community.atlassian.com/t5/forums/searchpage/tab/message?q=sourcetree Similarly, the Sourcetree Community products page ranks the same entry at the top of that listing with the next most popular entry, " How to update HTTP(S) credentials in sourcetree ," at well under 200,000 views. The listing https://community.atlassian.com/t5/Sourcetree/ct-p/sourcetree Of course, one can't blame the co...

Tell Git to use a specific 'ignore' file

Use the git config command to point Git to a custom location for storing the listing of files to ignore in repositories. git config --global core.excludesfile ~/.gitignore Additionally, the setting can be added by editing the config file directly.  The config file is at the root of the user's home directory and is named ".gitconfig." Most articles around the Web instructing users how to ignore specific types of files across repositories, describe creating a file named ".gitignore."  Almost without fail, the instructions suggest putting the .gitignore file at the root of the user's home direcory. ~/.gitignore The expectation is that this is a location that Git looks at by default to pick up any files that it should ignore.  It does not.  Rather, the default locations that Git looks to are: $XDG_CONFIG_HOME/git/ignore $HOME/.config/git/ignore If the first place is not found, then the second place is checked.  Git will not look at ~/.giti...

GitEye KB: Version 1.9 update fails

Issue GitEye version 1.9.x may fail with a time out error during its update procedure. The error reported may resemble the example below. An error occurred while collecting items to be installed session context was:(profile=DefaultProfile, phase=org.eclipse.equinox.internal.p2.engine.phases.Collect, operand=, action=). Unable to read repository at http://downloads.open.collab.net/git/giteye/release/plugins/org.eclipse.core.databinding_1.4.2.v20140729-1044.jar. Read timed out Unable to read repository at http://downloads.open.collab.net/git/giteye/release/plugins/org.eclipse.core.filesystem_1.4.100.v20140514-1614.jar. Read timed out Cause The reason why this happens isn't easily identified.  The indication of a timeout issue though leads suspicion towards things like a slow data connection or too many packages to update for the allotted time the package manager has specified. Solution Repeated attempts to update the software may eventually resolve the issue. ...

Forcing Mac OS X to use custom install of Git

UPDATE:   What may be a simpler approach is to edit the /etc/paths file by adding an entry for /usr/local/git/bin at the top of the file.  It seems that the solution presented in this article does not persist. Updating the PATH variable will allow Mac OS X to be able to find the binary from a custom install of Git .  Apple ships a version of Git with Xcode , but its version may lag behind Git's releases.  As such it may be desirable to use the official version from Git itself.  The Git installer puts the binary at /usr/local/git/bin which is not in the PATH variable. Starting with at least version 10.9 of Mac OS X, Git has had the unfortunate problem of not being invoked with the "conventional" commands from the terminal.  That is to say, running the command git status , for example, would generate an error stating: The "git" command requires the command line developer tools. This cue is helpful if Git isn't already installed on the system....

List all branches in GitEye History view

By default, GitEye only shows the other branches the checked out branch has been merged with.  There is a way however, to show all the branches.  In the History view, select the button that looks like a downward pointing Y.  The tool tip on this button is "Show All Branches and Tags" and clicking it will show or hide all the branches and tags this particular branch is unassociated with. The "Show All Branches and Tags" button. Assume a repository has 4 branches, A, B, C, and D, but branch D has only been merged with branches B and C.  This means that the history for D will only show B, C, and D items.  Sometimes though, it may be necessary to compare the checked out branch with branch A even though the two have never been merged.  This control will expose those other items and the diffs can be made.

Force checkout a branch with git

Occasionally, and probably against better practice, it's necessary to force a checkout of branch.  Doing so, necessarily overwrites any changes in the currently checked-out branch, but so be it. Using git it's done like this: git checkout -f BRANCHNAME The "-f" part is the "force" option.  Using "--force" instead does the same thing. Why would one do this?  If for no other reason, than because it may just be easier to stomp on the changes in one branch than to resolve the conflict.