Guest Blog Post: Six Tips to Make Your Git Life Easier | Syncfusion Blogs
Live Chat Icon For mobile
Live Chat Icon
Popular Categories.NET  (172).NET Core  (29).NET MAUI  (186)Angular  (105)ASP.NET  (51)ASP.NET Core  (82)ASP.NET MVC  (89)Azure  (40)Black Friday Deal  (1)Blazor  (208)BoldSign  (12)DocIO  (24)Essential JS 2  (106)Essential Studio  (199)File Formats  (63)Flutter  (129)JavaScript  (216)Microsoft  (118)PDF  (80)Python  (1)React  (97)Streamlit  (1)Succinctly series  (131)Syncfusion  (865)TypeScript  (33)Uno Platform  (3)UWP  (4)Vue  (45)Webinar  (49)Windows Forms  (61)WinUI  (68)WPF  (155)Xamarin  (160)XlsIO  (35)Other CategoriesBarcode  (5)BI  (29)Bold BI  (8)Bold Reports  (2)Build conference  (8)Business intelligence  (55)Button  (4)C#  (145)Chart  (123)Cloud  (14)Company  (443)Dashboard  (8)Data Science  (3)Data Validation  (8)DataGrid  (62)Development  (602)Doc  (7)DockingManager  (1)eBook  (99)Enterprise  (22)Entity Framework  (5)Essential Tools  (14)Excel  (37)Extensions  (22)File Manager  (6)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  (479)Mobile MVC  (9)OLAP server  (1)Open source  (1)Orubase  (12)Partners  (21)PDF viewer  (39)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)SfDataGrid  (9)Silverlight  (21)Sneak Peek  (29)Solution Services  (4)Spreadsheet  (11)SQL  (10)Stock Chart  (1)Surface  (4)Tablets  (5)Theme  (12)Tips and Tricks  (112)UI  (357)Uncategorized  (68)Unix  (2)User interface  (68)Visual State Manager  (2)Visual Studio  (30)Visual Studio Code  (17)Web  (566)What's new  (311)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.


Share this post:

Popular Now

Be the first to get updates

Subscribe RSS feed
Scroll To Top