The app will intelligently assume the most likely upstream and let you override this setting if you need to. GitKraken makes it easy to set upstreams. An upstream for a branch is the remote locations with which you push/pull that branch, and setting an upstream correctly is essential for workflows that incorporate pull requests into the main fork (see “Pull Requests” below). Remember refspecs? Upstreams are what we use to set refspecs for local branches. In the same way as cloning a repository, you can always directly add a URL if you’d rather. When adding a remote, GitKraken offers you a selection of forks of the currently open repository to add. Setting up remotes can be an annoyance, especially when you’re working with multiple remotes and upstreams. Git really comes into its own when you’re collaborating on projects. GitKraken has a preference section that allows you to add SSH keys to connected services, no CLI, no rsa copy-paste shenanigans. Working with SSH keys is a good way of getting the best of both worlds when it comes to security and user experience with SSH you pair up your keys with your services, set it up once, and you’re done. GitHub does make it easier to find your remote URL, but when cloning, GitKraken offers you a selection of repositories based on what remotes you have available in your service, and you can always just directly add a URL if you prefer. If you’re somewhat new to GitHub, or to working with remotes in general, understanding how remote URLs work or where to find them can be an obstacle. GitKraken, on the other hand, will only push the branch you select, so you won’t fall into this trap. Sounds good, right? Well, this default behavior updates all remote branches with the same name as local branches, and that can get messy. Git’s default behavior (if it can’t find an explicit refspec) is to push ‘matching’ branches, meaning every branch that exists locally will be updated remotely. Git uses something called refspec to define push behavior between local and remote branches. In GitKraken (on Windows), it’s as easy as checking/unchecking your AutoCRLF setting in Preferences > General. By default, Git has AutoCRLF set to ‘false’-set that to ‘true’ and be on your merry way. Fortunately, Git has an AutoCRLF option which will handle line endings for you. Did you know that Windows and Linux/Mac systems use different line ending characters? This can be a problem if you are moving or sharing between operating systems in your projects. But in truth, we rarely think about line endings as potential issues. Line endings, eh? Can’t live with ’em, can’t live without ’em. These are some of the irritation factors and obstacles that Axosoft developers experienced in the past, and how they solved them in GitKraken. So take a moment, breathe deep, and read on. Part of the ethos behind creating GitKraken, a cross-platform Git GUI, was to help put Git into human terms. But the learning curve is notoriously steep, and finding a path to understanding Git concepts can be difficult. Whether you’re working solo on a project and need a decent version history at your disposal, or you’re working collaboratively in a team in which you’re contributing regular updates to code, Git is an invaluable tool. Git is an increasingly essential tool to work with. (This guest blog was written by John Sparrow from Axosoft.)
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |