Help with git

Help with git

?

touch index.html(создали файл)

git init "New_Project"(создаем репозиторий)

git add —all (добавляем в репозиторий)

git status(чекнуть статус)

git commit -m "new_commit"(закоммитились)

git push(на сервер пушим изменения)

///////

git pull(собрать данные с сервера)

///////
To check status of files

git status && git add —all

///////

ls -a ~/.ssh - check ssh keys

git remote -v - repos connected?


You can delete an directory with { rm -rf 'name of directory' }

 git restore --staged tokens.py - delete file from undone commit, or an incomplete commit.

 git rm tokens.py -- remove file from commit changes



Start work!

git clone "URL" - copying url of git repo into ur pc

git checkout master

git pull

git checkout -b "myWork-Branch"

git pull master

git push --set-upstream "myWork-Branch:

git merge "myWork-Branch" --no-ff

reminder for me.

Hello. 15 June, so.

Today I have read about FizzBuzz task. And I solve it. There i`ll show my solution to this task.

def FizzBuzz():
    for i in range(101):
        print(i)
        if i % 2 == 0:
            print("")
        elif i % 3 == 0:
            print("Fizz")
        elif i % 5 == 0:
            print("Buzz")
        elif i % 5 == 0 and i % 3 == 0:
            print("FizzBuzz")

print(FizzBuzz())

Here it is. So, its not that hard as it seems to me, but print is kinda strange, because it still prints 0-100, while its needed to print only i% 3 and i%5. It was really curious and funny reading that people who wants to work as a programmer, can`t solve FizzBuzz, otherwise its will take a lot of time. Bye!

Report Page