Giter Club home page Giter Club logo

git-repo-cloner's Introduction

Git-repo-cloner

This is a simple C++ program that allows you to clone GitHub repositories using the command-line Git tool.

Prerequisites

  • C++ compiler
  • Git command-line tool

Getting Started

  1. Clone or download this repository.

  2. Build the project using your preferred build system or IDE.

  3. Run the program and follow the prompts to provide the GitHub repository URL and the local path to clone the repository.

  4. The program will execute the Git command to clone the repository and display a success message or indicate any errors encountered during the cloning process.

Usage

  • Ensure that the Git command-line tool is installed and accessible from the command line. Give the necessary input.

Contributing

Contributions are welcome! If you find any issues or have suggestions for improvements, please open an issue or submit a pull request.

License

This project is licensed under the MIT License.

Alternative

If this doesn't work, just use the below (It will definitely work, only one file requires):

#include <iostream>
#include <cstdlib>

int main() {
    std::cout << "GitHub Repository Cloner" << std::endl;

    // Retrieve repository URL from user
    std::string repositoryUrl;
    std::cout << "Enter the URL of the GitHub repository: ";
    std::getline(std::cin, repositoryUrl);

    // Retrieve target directory from user
    std::string targetDirectory;
    std::cout << "Enter the target directory (leave empty for current directory): ";
    std::getline(std::cin, targetDirectory);

    // Construct the git clone command
    std::string command = "git clone " + repositoryUrl;
    if (!targetDirectory.empty()) {
        command += " " + targetDirectory;
    }

    // Execute the git clone command
    int result = std::system(command.c_str());

    if (result == 0) {
        std::cout << "Repository cloned successfully!" << std::endl;
    } else {
        std::cerr << "Failed to clone repository." << std::endl;
    }

    return 0;
}

git-repo-cloner's People

Contributors

mkm12345 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.