dir.by  
Поиск >>

Компьютер, программы
→
Git (Project Versioning, Modified File History) | Git Extensions | GitHub.com | git in Team Explorer for Visual Studio 2017
 Мои bat файлы для работы с GitHub.com 
посмотрели 11268 раз
обновлено: 5 April 2018
Я создал bat файлы которые помогают выкладывать файлы с компьютера на GitHub.com
Создать новый пустой git локально (на компьютере)
git_init.bat
Чтобы выложить файлы на GitHub.com нужно
1_git_clone.bat
Взять файлы с GitHub.com
2_git_commit.bat
Добавить изменные файлы на git (локально)
3_git_push.bat
Выложить измененные файлы на GitHub.com
Дополнительные функции
git_remote_view.bat
посмотреть путь, где находится удаленный репозиторий (GitGub.com)
git_remote_add.bat
добавить путь, на удаленный репозиторий (GitGub.com)
Содержимое bat файлов
  Command Prompt (Win Console)     git_init.bat
@echo off

rem Ваш путь к repository !!!!!!!!!!!!
set mydrive=J:\
set mypath=Evgen\MyGit\GameNode.js

rem Проверяем => путь должен существовать
if not exist %mydrive%%mypath% (
echo Error! Folder %mydrive%%mypath% not exist

rem ждем нажатие любой клавиши чтобы выйти
pause
exit
)

rem устанавливаем текущий путь
cd %mydrive%
cd %mypath%

rem Проверяем => текущий путь не должен содержать .git
if exist .git (
echo Warning! .git already exist. %mydrive%%mypath%\.git

rem ждем нажатие любой клавиши чтобы выйти
pause
exit
)

rem create repository
git init

rem ждем нажатие любой клавиши чтобы выйти
pause
  Command Prompt (Win Console)     1_git_clone.bat
@echo off

rem Ваш путь к repository !!!!!!!!!!!!
set mydrive=J:\
set mypath=Evgen\MyGit

rem устанавливаем текущий путь
cd %mydrive%
cd %mypath%

rem clone откуда копировать repository
git clone https://github.com/EvgenProjects/GameNode.js
  Command Prompt (Win Console)     2_git_commit.bat
@echo off

rem Ваш путь к repository !!!!!!!!!!!!
set mydrive=J:\
set mypath=Evgen\MyGit\GameNode.js

rem Имя пользователя кто выкладывает файлы !!!!!!!!!!!!
git config --global user.name "Evgeni"
git config --global user.email my@example.com

rem устанавливаем текущий путь
cd %mydrive%
cd %mypath%

rem просканировать новые файлы
git add *

rem выложить новые файлы
git commit -m "added new file index.js"
  Command Prompt (Win Console)     3_git_push.bat
@echo off

rem Ваш путь к repository !!!!!!!!!!!!
set mydrive=J:\
set mypath=Evgen\MyGit\GameNode.js

rem устанавливаем текущий путь
cd %mydrive%
cd %mypath%

rem выложить новые файлы на удаленный репозитарий
git push
  Command Prompt (Win Console)     git_remote_view.bat
@echo off

rem Ваш путь к repository !!!!!!!!!!!!
set mydrive=J:\
set mypath=Evgen\MyGit\GameNode.js\.git

rem устанавливаем текущий путь
cd %mydrive%
cd %mypath%

rem смотрим путь на удаленный repository
git remote -v
  Command Prompt (Win Console)     git_remote_add.bat
@echo off

rem Ваш путь к repository !!!!!!!!!!!!
set mydrive=J:\
set mypath=Evgen\MyGit\GameNode.js\.git

rem устанавливаем текущий путь
cd %mydrive%
cd %mypath%

rem смотрим путь на удаленный repository
git remote add origin http://111.by
Скачать bat файлы: my_console_git_commands.zip
 
← Previous topic
git push (push local changes to a remote repository in the Git console)
 
Next topic →
git remote prune origin (remove the inormation from your local repository)
 
Your feedback ... Comments ...
   
Your Name
Your comment (www links can only be added by a logged-in user)

Новость "Черная пятница" Dreame в Беларуси – две недели скидок до 3400 рублей
 
Git Extensions
• Git Extensions. Download and install Git Extensions for Windows
.gitignore (hide files)
• .gitignore | Hide files in Git Extensions
araxis to compare changes
• Using araxis to compare changes in Git Extensions
stash change repository
• Saving new files to stash using Git Extensions
Tag
• Tag | How to search tag in the Git Extensions
Creating a Repository. Working with Commit and Push files
• Creating a Repository on Git Extensions for Windows
• Commit and Push in Git Extensions for Windows
Branch in Git Extensions
• Branch | Switch to branch | Git Extensions
• Create a branch on Git Extensions for Windows
• Take the latest changes from the master branch to our branch. Git Extensions for Windows
• Upload the files to our branch. Git Extensions for Windows
Merging into my branch
• Merge to my branch (take the latest changes from another branch to my branch) | Merge remote branch into current branch | Git Extensions
Put Our Branch in the Master Branch
• Option 1 (using Cherry pick commit). Put our branch into the master branch. Git Extensions for Windows
• Option 2 (use Rebase, Reset). Put our branch into the master branch. Git Extensions for Windows
GitHub.com
• Register on GitHub.com
• Create an empty Repository on GitHub.com
• How to make a GitHub Repository private
• Download Repository from GitHub.com to your PC using the Console
• Download Repository from GitHub.com to your PC with Git Extensions
• Add files to the Repository on your computer, then upload the files to GitHub using Git Extensions
• Removing the repository from the GitHub.com
• Formatting a README.md file to GitHub.com
• I click Push in Git Extensions and see an error: Permission to ,git denided. Unable to access 'https://github.com/...
Git console (working with GitHub.com)
• Git console. Download and install the Git console for Windows
• git init (create a new empty repository in the Git console)
• git remote (see, add the path where the remote repository is located in the Git console)
• git clone (copy of the remote repository in the Git console)
• git add & git commit (add files to a local repository in the Git console)
• git push (push local changes to a remote repository in the Git console)
***
• My bat files to work with git console with GitHub.com
***
• git remote prune origin (remove the inormation from your local repository)
• git svn clone (copy of the remote repository svn)
• I was given the folder .git and no source code. To get the files, run git clone. For packaging, use git clone --bare
Team Expolorer for git
• Azure DevOps. Commit files to git using Team Explorer in Visual Studio 2017
Additional topics, questions
• What do the "branches" and "trunk" folders mean in the git repository?

  Ваши вопросы присылайте по почте: info@dir.by