Simple deployment of a private git solution for professional teams
Run the following scripts ............
brew install git
sudo apt-get install git-all
- On the server create a directory for all git projects to be stored
mkdir projectdirectory
- cd into the directory
cd projectdirectory
- Initialize git by typing
git init
- Type
ssh-keygen -t rsa
- In the following command, replace serverip, with the servers actually ip address and user with the username used to log into the server
cat ~/.ssh/id_rsa.pub | ssh user@serverip "mkdir -p ~/.ssh && cat >> ~/.ssh/authorized_keys"
- First go to a new directory on your computer which will be your working directory
- Run the following command:
git clone user@serverip:/home/speech/git/projects.git
- Cd into the Projects Directory
cd Projectdirecotry
- Create a new Branch and Name it something that describes the changes you are making for example "Fixed VAD" :
git branch $branchname$
- Move to your branch by typing
git checkout $branchname$
- Make sure you are in the new branch by typing
git status
- Once you know you are in the new branch, start changing the files there normally, and use this directory for all the work
- Once you have finished making changes , type
git add .
for these changes to be updated. - Check the differences between master branch and your branch by typing
git diff
, make sure the changes have been reflected here - Now its time to commit , type
git commit -m CommitName
, here CommitName describes any issues you have fixed - Finally its time to push your changes to origin. Type
git push origin Branchname
- Wait for admin to accept your commit and merge your branch to the master.
- Have fun!
- First, fetch all the changes made while others were working on the project by typing
git pull
- Next start a new branch for whatever changes you will be making for example SRTfix ,
git branch branchname
- Double check that you are on a new branch by typing
git status
- Continue working as usual and when you are done do
git add .
- Check if the changes have been reflected by typing
git diff
- Commit the changes by typing
git commit -m CommitName
, here commitname describes what problems you may have solved - Now its time to push your changes , type
git push origin BranchName
- Wait for admin to merge
- Have fun!