Guest Blog Post: Six Tips to Make Your Git Life Easier | Syncfusion Blogs
Live Chat Icon For mobile
Live Chat Icon
Popular Categories.NET  (174).NET Core  (29).NET MAUI  (207)Angular  (109)ASP.NET  (51)ASP.NET Core  (82)ASP.NET MVC  (89)Azure  (40)Black Friday Deal  (1)Blazor  (215)BoldSign  (14)DocIO  (24)Essential JS 2  (107)Essential Studio  (200)File Formats  (66)Flutter  (133)JavaScript  (221)Microsoft  (118)PDF  (81)Python  (1)React  (100)Streamlit  (1)Succinctly series  (131)Syncfusion  (914)TypeScript  (33)Uno Platform  (3)UWP  (4)Vue  (45)Webinar  (51)Windows Forms  (61)WinUI  (68)WPF  (159)Xamarin  (161)XlsIO  (36)Other CategoriesBarcode  (5)BI  (29)Bold BI  (8)Bold Reports  (2)Build conference  (8)Business intelligence  (55)Button  (4)C#  (147)Chart  (131)Cloud  (15)Company  (443)Dashboard  (8)Data Science  (3)Data Validation  (8)DataGrid  (63)Development  (628)Doc  (8)DockingManager  (1)eBook  (99)Enterprise  (22)Entity Framework  (5)Essential Tools  (14)Excel  (40)Extensions  (22)File Manager  (7)Gantt  (18)Gauge  (12)Git  (5)Grid  (31)HTML  (13)Installer  (2)Knockout  (2)Language  (1)LINQPad  (1)Linux  (2)M-Commerce  (1)Metro Studio  (11)Mobile  (507)Mobile MVC  (9)OLAP server  (1)Open source  (1)Orubase  (12)Partners  (21)PDF viewer  (43)Performance  (12)PHP  (2)PivotGrid  (4)Predictive Analytics  (6)Report Server  (3)Reporting  (10)Reporting / Back Office  (11)Rich Text Editor  (12)Road Map  (12)Scheduler  (52)Security  (3)SfDataGrid  (9)Silverlight  (21)Sneak Peek  (31)Solution Services  (4)Spreadsheet  (11)SQL  (10)Stock Chart  (1)Surface  (4)Tablets  (5)Theme  (12)Tips and Tricks  (112)UI  (387)Uncategorized  (68)Unix  (2)User interface  (68)Visual State Manager  (2)Visual Studio  (31)Visual Studio Code  (19)Web  (592)What's new  (332)Windows 8  (19)Windows App  (2)Windows Phone  (15)Windows Phone 7  (9)WinRT  (26)

Guest Blog Post: Six Tips to Make Your Git Life Easier

(This guest blog was written by John Sparrow from Axosoft.)

Git is an increasingly essential tool to work with. 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. But the learning curve is notoriously steep, and finding a path to understanding Git concepts can be difficult.

Part of the ethos behind creating GitKraken, a cross-platform Git GUI, was to help put Git into human terms. So take a moment, breathe deep, and read on. These are some of the irritation factors and obstacles that Axosoft developers experienced in the past, and how they solved them in GitKraken.

1. Line Endings and crlf

Line endings, eh? Can’t live with ’em, can’t live without ’em. But in truth, we rarely think about line endings as potential issues. 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. Fortunately, Git has an AutoCRLF option which will handle line endings for you. By default, Git has AutoCRLF set to ‘false’—set that to ‘true’ and be on your merry way. In GitKraken (on Windows), it’s as easy as checking/unchecking your AutoCRLF setting in Preferences > General.

2. Default Push Behaviors and refspec

Git uses something called refspec to define push behavior between local and remote branches. 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. Sounds good, right? Well, this default behavior updates all remote branches with the same name as local branches, and that can get messy. GitKraken, on the other hand, will only push the branch you select, so you won’t fall into this trap.

3. Attack of the Clones

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. 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.

4. You are the Keymaster

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. GitKraken has a preference section that allows you to add SSH keys to connected services, no CLI, no rsa copy-paste shenanigans.

5. Working Collaboratively with Remotes

Git really comes into its own when you’re collaborating on projects. Setting up remotes can be an annoyance, especially when you’re working with multiple remotes and upstreams. When adding a remote, GitKraken offers you a selection of forks of the currently open repository to add. In the same way as cloning a repository, you can always directly add a URL if you’d rather.

Remember refspecs? Upstreams are what we use to set refspecs for local branches. 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). GitKraken makes it easy to set upstreams. The app will intelligently assume the most likely upstream and let you override this setting if you need to.

6. Pull Requests

Working with branches is one thing, but when you want to get truly collaborative, you can work with forks, branches, and pull requests. Forking means that you have a discrete repo cloned from the original. Using this, you can work on a remote that you own, and then make a pull request to start the process of merging your edits back into the original repository. This way, you have oversight in your projects and can work independently on features and hotfixes while still being able to easily merge back in when you’re ready.

So, there you have it! Those are the 6 ways the Axosoft dev team has made working with Git easier in GitKraken. If you’re ready to make your Git life easier, download GitKraken now! Then, download Git Succinctly, Syncfusion’s free e-book, to brush up on Git concepts.

Tags:

Share this post:

Popular Now

Be the first to get updates

Subscribe RSS feed

Be the first to get updates

Subscribe RSS feed