DEV Community

technonotes-hacker
technonotes-hacker

Posted on

GIT - 29 August ' 23

COLLABORATOR

Image description

  1. Create a Repository and clone from your local.
  2. URL can be taken from the code tab and opt for HTTPS URL.
  3. Add a file in the local.
  4. commit the file with the message.
  5. Push to the Repository from Stage ( which is in Local )
git clone https://github.com/technonotes-hacker/git-demo.git
cd git-demo/
git status ( If its in RED color then Stage area உள்ள போகவே இல்லை ,  அதே GREEN  இருந்தா STAGE area  உள்ள போயிடுச்சுன்னு அர்த்தம் )
Now GIT will start tracking all changes.
git commit -m "this is my first commit in apple file"
git push origin main
Enter fullscreen mode Exit fullscreen mode

Image description

Image description

Image description

Image description

Image description

Image description

Now create a collaborator,

settings > Collaborators > Add people
Enter fullscreen mode Exit fullscreen mode

Image description

Image description

Image description


User will receive an e-mail
,

Image description

Image description

Owner is : technonotes-hacker but the owner has given some access to the other collaborator. Now the user i.e the collaborator accepted the invite and started to clone and add a file.

Image description

Image description

Image description

Image description

Image description

Collaborator create பண்ண file இங்க வந்துடுச்சு , இந்த login collaboratorஓடது .

Image description

Now the file came to the OWNER, but won't be visible in his local i.e laptop.

Image description

இப்ப pull பண்ணதும் Mango file இங்க வந்துடுச்சு , இதை யாருக்கு create பண்ணான்னு ஞாபகம் இருக்கு இல்ல i.e Collaborator user.

git pull origin main
Enter fullscreen mode Exit fullscreen mode

Image description

Both owner & collaborator can change the files , its like MUTUAL understanding. Even we can merge after making all changes between them.

Also , as you are the collaborator you can fork any Repository BUT keep in mind . Can we edit or change any file ? Lets see
இத்தனை Repo technonotes-hacker create பண்ணது , இத நம்ம fork பண்றோம் .

Image description

இப்ப நான் இத வந்து fork பண்ண போறேன் project5 ,

Image description

Image description

இந்த project5 collaboratorகு வந்துடுச்சு,இதுல நம்ம change பண்ண பாப்போம்.

Image description

Change/create file பண்ணலாம் ஆனா OWNERகு reflect ஆகாது . Correct தானே , எப்படி ? நீங்கமாட்டேன்னு fork பண்ணிடுவீங்க அதுக்கப்புறம் changeசஸ் பண்ணுவீங்க , அப்புறம் எப்படி இந்த original code maintain பண்ண முடியும். So for that Collaborator will request to the OWNER , these are the changes please accept it. இந்த changes எல்லாம் நான் பண்ணி இருக்கேன் வேணும்னா accept பண்ணுங்க.

Image description

Image description

Image description

Image description

Image description

Image description

நல்லா பாருங்க below screenshot இவர்தான் OWNER , இங்க அந்த file இல்ல பாத்தீங்களா ? அந்த manago file இங்க இருக்காது . புரியுதா ? சிம்பிளா சொல்லனும்னா collaborator create பண்ணிட்டாரு OWNERகு அது தெரிய வராது .

Image description

Now we need to create pull request to the OWNER saying " so and so things are carried out in this project5 ".

Image description

Image description

Image description

Image description

Image description

The owner will receive a mail like this with the commit ID. A pull request.

Image description

Image description

Image description

Accepting it , CONFIRM MERGE .

Image description

Image description

Image description

File came to GIT but local copy இன்னும் வரல . So என்ன பண்ணனும் ? Same process again ,

Below screenshotல, banana file இருக்காது. PR பண்ணதும் அந்த பைல் இங்கே வந்துரும்
Image description

Image description


Important Notes :

1.Always create a GIT repository only with the "+" symbol,

Image description

2.Don't forget to add the README file which is a good practice ,

Image description

Image description

3.Repository can be created only in the Browser.

4.How to create a Personal access tokens for the logins?

Settings > Developer Settings > Personal access tokens (classic)
Enter fullscreen mode Exit fullscreen mode

Image description

5.One question may arise why this option is required ?
Its like a closed team may work on a specific project , so create as collaborator so that you can review and then commit to that particular branch.

6.PR is nothing but PULL REQUEST.

Top comments (0)