Skip to content

About

🛠️ Importing a contribution to a private git project without copying the code modified for macOS

Topics

Resources

Stars

2 stars

Watchers

1 watching

Forks

Latest commit

 

History

2 Commits

Folders and files

Repository files navigation

Contributions

This tool allows you to import and display contributions to private projects without copying the actual code into a single project with a contribution mockup. It has been modified for macOS based on the original

Process

Installation Instructions

Install Homebrew

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

Install Python

brew install python
python3 --version
pip3 --version

### Install Git

brew install git
git --version

### Install GitPython

`# Virtual environment: Create, Activate, Install, Verify

python3 -m venv venv
source venv/bin/activate
pip install gitpython
python -c "import git; print('GitPython installed successfully!')"

# When finished, deactivate the environment and remove the environment folder

deactivate
rm venv

Working with the Import

  1. Install GitPython via a virtual environment
python3 -m venv venv
source venv/bin/activate
pip install gitpython
python -c "import git; print('GitPython installed successfully!')"
  1. Set the path to the folder containing the import scripts Importer at its root, and the launch script RunImport.py
  2. Specify the paths to the folders of private projects where git is located repo1 = git.Repo("Path/PrivateProject1/.git") and list them in the array importer = ImporterFromRepository([repo1, repo2], mock_repo)
  3. Specify the path to the empty git repository used to store the contribution mock_repo = git.Repo("Path/MockProjects/.git"). If git has not been initialized, run the command
git init
  1. Specify the emails to capture selected commits from importer.set_author(['work@email.ru', 'personal@email.ru'])
  2. Run the contribution import script
python RunImport.py
  1. Deactivate the virtual environment and remove the folder
deactivate
rm venv

Notes

All commands are executed in the terminal. Use python3 and pip3 instead of python/pip to avoid conflicts with older Python versions. If permission errors occur

pip3 install --user gitpython

About

🛠️ Importing a contribution to a private git project without copying the code modified for macOS

Topics

Resources

Stars

2 stars

Watchers

1 watching

Forks

Contributors

Languages