Home » Tag Archives: Git

Tag Archives: Git

Storing Encrypted Credentials In Git

We all know that we should not commit any passwords or keys to the repo with our code (no matter if public or private). Yet, thousands of production passwords can be found on GitHub (and probably thousands more in internal company repositories). Some have tried to fix that by removing the passwords (once they learned it’s not a good idea ...

Read More »

Git commit fixup and autosquash

Git commit fixup and autosquash are helpful features when you want to “fix” changes from a single commit in your history. If you discover that you want to change a single commit in your Git history, you would need to manually commit based on the commit you’re about to change and perform a git rebase. Fixup commits produce commits that ...

Read More »

Custom Git subcommands

Heavy users of Git often find themselves writing their own Git shortcuts or scripts which combine multiple Git commands for frequently used features. The possibilities to shortcut your way around Git include Git aliases, shell aliases, or custom scripts that reside in your $PATH. For the latter, there is an interesting feature in the Git command line that I just ...

Read More »

Git Tutorial for Beginners

1. What is Git ? Git is a popular file versioning system used globally by numerous developers for their projects. It is lightweight and swift in its performance as compared to the likes. With a number of UI based tools to assist in Git based versioning, it has become extremely convenient for the developers to use Git Versioning System. Git flaunts ...

Read More »

Git version control with Eclipse (EGit) Tutorial

1. What is EGit ? GIT is a popular versioning system used widely across the software development sector. Despite being a popular versioning system, it isn’t really easy to work with when it comes to using the command line interface for versioning. To solve this difficulty, the developers came up with creative GUI based tools called the GIT clients. GIT ...

Read More »

Access Git repositories with Java using SSH keys

For some use-cases you might access a git repository from a Java application. JGit offers a helpful integration with builder pattern APIs. The Git client can authenticate itself using SSH keys. To open a Git repository call the cloneRepository() command. File workingDir = Files.createTempDirectory("workspace").toFile(); TransportConfigCallback transportConfigCallback = new SshTransportConfigCallback(); git = Git.cloneRepository() .setDirectory(workingDir) .setTransportConfigCallback(transportConfigCallback) .setURI("ssh://example.com/repo.git") .call(); Our own implementation of ...

Read More »

How to create new Git Repository and host it in Bitbucket

What is Git ? While working in a team which involves multiple developers,it is very much necessary to use a Version Control System. Version Control System is basically a Software using which – Multiple developers can put their code in(Check In). – Take (Check Out) the code of fellow Software developers. – See the version history of the files(Who committed ...

Read More »