class GemHadar

def git_remotes_task

separate lines.
formatted to show each remote name followed by its corresponding URL on
remote's URL using the `git remote get-url` command. The output is
the git_remotes method to obtain the remote names and then fetches each
retrieves and prints the list of Git remotes along with their URLs. It uses
This method sets up a :git_remotes task under the Rake namespace that

remote repositories configured for the project.
The git_remotes_task method defines a Rake task that displays all Git
def git_remotes_task
  task :git_remotes do
    puts git_remotes.map { |r|
      url = `git remote get-url #{r.inspect}`.chomp
      "#{r} #{url}"
    }
  end
end