1659694080
This is git-spelunk, an interactive tool for exploring blame history.
Install with gem install git_spelunk
(requires Ruby 2+).
git blame
is a great tool for determining code responsibility. But sometimes when you fire up git-blame, you'll find yourself in a loop of git-blame
, git-show
, and then git-blame
again in order to find the true owner of a line of code. git-spelunk
is the tool for situations like this, when you want to skip past syntactic and refactoring commits to find the true owner of a line, or see how a piece of source code has evolved over time.
It's easier to show you.
git spelunk lib/git_spelunk/offset.rb
You can see we've highlighted line 45. git-spelunk
here is telling us that this line was introduced in commit 33465d2. You can also see that all other lines that were involved in 33465d2 are picked out in green. The output of git show
is present as well for adding more context to the information.
Now we press '['. What we're asking here is "show me the file just before 33465d2" was introduced, essentially replacing the content of the current screen with git blame [file] 33465d2~1
.
There's other stuff to do; you can hit "s" to do a git show
of the commit underneath the cursor, you can search and page through the file like you would with "less".
Author: osheroff
Source code: https://github.com/osheroff/git-spelunk
License: MIT license
#ruby #ruby-on-rails #github #git
1659694080
This is git-spelunk, an interactive tool for exploring blame history.
Install with gem install git_spelunk
(requires Ruby 2+).
git blame
is a great tool for determining code responsibility. But sometimes when you fire up git-blame, you'll find yourself in a loop of git-blame
, git-show
, and then git-blame
again in order to find the true owner of a line of code. git-spelunk
is the tool for situations like this, when you want to skip past syntactic and refactoring commits to find the true owner of a line, or see how a piece of source code has evolved over time.
It's easier to show you.
git spelunk lib/git_spelunk/offset.rb
You can see we've highlighted line 45. git-spelunk
here is telling us that this line was introduced in commit 33465d2. You can also see that all other lines that were involved in 33465d2 are picked out in green. The output of git show
is present as well for adding more context to the information.
Now we press '['. What we're asking here is "show me the file just before 33465d2" was introduced, essentially replacing the content of the current screen with git blame [file] 33465d2~1
.
There's other stuff to do; you can hit "s" to do a git show
of the commit underneath the cursor, you can search and page through the file like you would with "less".
Author: osheroff
Source code: https://github.com/osheroff/git-spelunk
License: MIT license
1617875220
In this short article, we’ll be exploring some quick git commands that can help us in digging through our repositories’ history of commits. We’ll look at
#git #git-log #git-commands #git-history #aws
1604109000
Git has become ubiquitous as the preferred version control system (VCS) used by developers. Using Git adds immense value especially for engineering teams where several developers work together since it becomes critical to have a system of integrating everyone’s code reliably.
But with every powerful tool, especially one that involves collaboration with others, it is better to establish conventions to follow lest we shoot ourselves in the foot.
At DeepSource, we’ve put together some guiding principles for our own team that make working with a VCS like Git easier. Here are 5 simple rules you can follow:
Oftentimes programmers working on something get sidetracked into doing too many things when working on one particular thing — like when you are trying to fix one particular bug and you spot another one, and you can’t resist the urge to fix that as well. And another one. Soon, it snowballs and you end up with so many changes all going together in one commit.
This is problematic, and it is better to keep commits as small and focused as possible for many reasons, including:
Additionally, it helps you mentally parse changes you’ve made using git log
.
#open source #git #git basics #git tools #git best practices #git tutorials #git commit
1597916460
There is no doubt that Git plays a significant role in software development. It allows developers to work on the same code base at the same time. Still, developers struggle for code quality. Why? They fail to follow git best practices. In this post, I will explain seven core best practices of Git and a Bonus Section.
Committing something to Git means that you have changed your code and want to save these changes as a new trusted version.
Version control systems will not limit you in how you commit your code.
But is it good? Not quite.
Because you are compromising code quality, and it will take more time to review code. So overall, team productivity will be reduced. The best practice is to make an atomic commit.
When you do an atomic commit, you’re committing only one change. It might be across multiple files, but it’s one single change.
Many developers make some changes, then commit, then push. And I have seen many repositories with unwanted files like dll, pdf, etc.
You can ask two questions to yourself, before check-in your code into the repository
You can simply use the .gitignore file to avoid unwanted files in the repository. If you are working on more then one repo, it’s easy to use a global .gitignore file (without adding or pushing). And .gitignore file adds clarity and helps you to keep your code clean. What you can commit, and it will automatically ignore the unwanted files like autogenerated files like .dll and .class, etc.
#git basics #git command #git ignore #git best practices #git tutorial for beginners #git tutorials
1622462142
Ruby on Rails is a development tool that offers Web & Mobile App Developers a structure for all the codes they write resulting in time-saving with all the common repetitive tasks during the development stage.
Want to build a Website or Mobile App with Ruby on Rails Framework
Connect with WebClues Infotech, the top Web & Mobile App development company that has served more than 600 clients worldwide. After serving them with our services WebClues Infotech is ready to serve you in fulfilling your Web & Mobile App Development Requirements.
Want to know more about development on the Ruby on Rails framework?
Visit: https://www.webcluesinfotech.com/ruby-on-rails-development/
Share your requirements https://www.webcluesinfotech.com/contact-us/
View Portfolio https://www.webcluesinfotech.com/portfolio/
#ruby on rails development services #ruby on rails development #ruby on rails web development company #ruby on rails development company #hire ruby on rails developer #hire ruby on rails developers