Versioning: Difference between revisions

From Network Security Wiki
Content added Content deleted
(page created)
 
No edit summary
 
(9 intermediate revisions by the same user not shown)
Line 1: Line 1:
[[Category: ]]
[[Category:Scripting]]
__TOC__
__TOC__
<br />
<br />
Line 8: Line 8:
sudo apt-get install mercurial
sudo apt-get install mercurial


Usage:
Usage:<br />
cd to the config directory:
cd to the config directory:
cd /etc/freeradius
cd /etc/freeradius
Line 24: Line 24:
If at any time the something doesn't work, revert to "known working" configuration:
If at any time the something doesn't work, revert to "known working" configuration:
hg revert --all
hg revert --all

If you get error regarding any deleted files:
hg commit
''nothing changed (4 missing files, see 'hg status')''

This will add all new files that are not ignored, and remove all locally missing files
sudo hg addremove


= Subversion =
= Subversion =
Line 29: Line 36:
{{UC}}
{{UC}}


= GIT =
= Git =
Initializing GIT repository:
Create a online repository on https://github.com

On Local Server:
git init
echo "# test" >> README.md
git config --global user.email "amanjosan2008@gmail.com"
git config --global user.name "Amandeep Singh"
git add .
git commit -m "first commit"
git remote add origin https://github.com/amanjosan2008/test.git
git push -u origin master

Add all files & Remove deleted files:
git add -A

Remove a particular file from being traced:
git reset logo.png


Commit:
{{UC }}
git commit -m "2nd Commit"
git push -u origin master


<br />
<br />

Latest revision as of 08:13, 8 February 2018


Mercurial

Installation

sudo apt-get install mercurial

Usage:
cd to the config directory:

cd /etc/freeradius

Initiate HG:

hg init
hg add
hg commit
   Type a commit message. Almost anything will do.

Perform changes and check if everything is working properly and commit:

hg commit
   Type a commit message describing what was changed, and why.

If at any time the something doesn't work, revert to "known working" configuration:

hg revert --all

If you get error regarding any deleted files:

hg commit
nothing changed (4 missing files, see 'hg status')

This will add all new files that are not ignored, and remove all locally missing files

sudo hg addremove

Subversion

        This section is under construction.

Git

Initializing GIT repository:

Create a online repository on https://github.com

On Local Server:

git init
echo "# test" >> README.md
git config --global user.email "amanjosan2008@gmail.com"
git config --global user.name "Amandeep Singh"
git add .
git commit -m "first commit"
git remote add origin https://github.com/amanjosan2008/test.git
git push -u origin master

Add all files & Remove deleted files:

git add -A

Remove a particular file from being traced:

git reset logo.png

Commit:

git commit -m "2nd Commit"
git push -u origin master


References





{{#widget:DISQUS |id=networkm |uniqid=Versioning |url=https://aman.awiki.org/wiki/Versioning }}