投稿時間:2021-10-06 21:27:38 RSSフィード2021-10-06 21:00 分まとめ(38件)

カテゴリー等 サイト名等 記事タイトル・トレンドワード等 リンクURL 頻出ワード・要約等/検索ボリューム 登録日
IT 気になる、記になる… セブン-イレブン、10月31日で「ポケモンGO」とのコラボを終了へ − ポケストップを削除 https://taisy0.com/2021/10/06/147073.html 設置 2021-10-06 11:19:44
IT 気になる、記になる… Appleの整備済み商品情報 2021/10/6 https://taisy0.com/2021/10/06/147070.html apple 2021-10-06 11:07:37
IT 気になる、記になる… ソフトバンク、「Apple Watch Series 7」を10月15日に発売 − 10月8日午後9時より予約受付開始へ https://taisy0.com/2021/10/06/147067.html apple 2021-10-06 11:02:58
TECH Engadget Japanese セブン‐イレブンでニンテンドープリペイドカードを買うとプロコン・ジョイコンが当たる! https://japanese.engadget.com/nintendo-switch-113018718.html nintendo 2021-10-06 11:30:18
python Pythonタグが付けられた新着投稿 - Qiita 比較元リストと比較先リストの比較(pythonでterminalを操作) https://qiita.com/ti104110/items/23f7b9d6dd5ac4894cdc テキストの行目までと末尾行を削除linopenターミナルで保存した出力txtreadlinesopenターミナルで保存した出力txtwwritelineslin最初の行と末尾の行を削除確認verificationターミナルで保存した出力txtファイルを開くFinderでパス名をコピーして貼り付けるltフルパスでなくてもOKgtverificationpopenテキストファイルからdataを読み込むwithopenターミナルで保存した出力txtrasfnlistfreadsplitnターミナルで保存した出力txtをolisttxtにコピーするshutilcopyターミナルで保存した出力txtolisttxt確認verificationverificationverificationolistnlistlistの比較差集合resultlistsetnlistsetolistprint比較した結果を表示ifnlistolistprint差異はありませんelsepprintpprintresultprintprintpiplistの比較差集合を終了します。 2021-10-06 20:30:17
js JavaScriptタグが付けられた新着投稿 - Qiita JavaScriptでコピーボタンを実装する方法 https://qiita.com/kandalog/items/1e960d14ab9b111c9135 JavaScriptでコピーボタンを実装する方法はじめにJavaScriptを使ってコピーボタンを作る方法を知ったので、書いていく。 2021-10-06 20:43:29
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) パブリックリポジトリでExceptionInInitializerErrorが発生する https://teratail.com/questions/363130?rss=all パブリックリポジトリでExceptionInInitializerErrorが発生するGitHubなどでパブリックリポジトリを公開しているのですがその中の列挙型クラスから列挙子を読み取るとエラーが発生しました。 2021-10-06 20:56:54
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) kaggleのコンペティションとDatasetのライセンスGPL2について https://teratail.com/questions/363129?rss=all kaggleのコンペティションとDatasetのライセンスGPLについてkaggleのコンペティションとDatasetのライセンスについてご存知の方がいれば教えていただけますか。 2021-10-06 20:50:10
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) WEBサイトに埋めこんだ動画のダウンロードを防ぎたい https://teratail.com/questions/363128?rss=all WEBサイトに埋めこんだ動画のダウンロードを防ぎたい実現したいことダウンロードできないように、動画をWEBサイトに埋めこみたいです。 2021-10-06 20:47:03
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) パソコン版とスマホ版で文字や画像の表示の仕方を変えるには https://teratail.com/questions/363127?rss=all 2021-10-06 20:42:40
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) cssの一部コードが白色になってしまいます。どこが間違ってるかわからないです。 https://teratail.com/questions/363126?rss=all cssの一部コードが白色になってしまいます。 2021-10-06 20:37:24
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) python-wordpress-xmlrpcでスクレイピングしたタグ情報を複数個投稿したいのですが、配列の関係で投稿がうまくできません。 https://teratail.com/questions/363125?rss=all taglistという変数で、インターネットサイトページから複数個のタグの情報を取得して配列化した後に、下記のposttagへ代入して投稿したいのですがうまくいきません。 2021-10-06 20:31:04
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) レスポンシブwebデザイン 1つの要素を1番後ろに持っていくには https://teratail.com/questions/363124?rss=all レスポンシブwebデザインつの要素を番後ろに持っていくにはつのsectionの中でMOREという文字を一番後ろに回すことを実現したいです。 2021-10-06 20:24:38
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) フィルター機能を作る際の考え方について https://teratail.com/questions/363123?rss=all フィルター機能を作る際の考え方についてUnityでアプリを作成しているのですが、フィルター機能を作成するにあたりいろいろ考え中なので皆様の考え方をお聞きしたいと思い質問いたしました。 2021-10-06 20:17:01
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) DBに登録済みのusernameも登録されてします https://teratail.com/questions/363122?rss=all DBに登録済みのusernameも登録されてしますデータベースに登録されているusernameは登録されないようにしたい。 2021-10-06 20:11:05
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) 海外サイトの.jsファイルのソースをブラウザで開くとクラッシュ https://teratail.com/questions/363121?rss=all source 2021-10-06 20:03:19
Linux Ubuntuタグが付けられた新着投稿 - Qiita Emacs on UbuntuでNasuMフォントを使う https://qiita.com/Yack-Deculture/items/55fd56949fb08ad8cd54 私の環境Ubuntuでは、以下のコードがemacsdinitelに追加されていた。 2021-10-06 20:41:28
技術ブログ Developers.IO วิธีอัปโหลดไฟล์ด้วย WinSCP ไปยัง Server Website ที่ตั้งค่าใน EC2 https://dev.classmethod.jp/articles/how-to-upload-files-with-winscp-go/ วิธีอัปโหลดไฟล์ด้วยWinSCP ไปยังServer Website ที่ตั้งค่าในECบทความนี้ผมจะมาเขียนต่อจากวิธีInstall PHP and Apache ในAmazon Linux ของEC WinSCP คืออะไรWinSCP วิน 2021-10-06 11:18:55
海外TECH DEV Community 🚀 The Missing Docker Crash Course for Developers https://dev.to/bobbyiliev/the-missing-docker-crash-course-for-developers-2ccb The Missing Docker Crash Course for Developers Introduction to DockerIt is more likely than not that Docker and containers are going to be part of your IT career in one way or another In this blog post series I ll cover the following What are Docker images containers and Docker Hub Installing Docker on Ubuntu Linux on a DigitalOcean Droplet Working with Docker containers Working with Docker images Deploying a Dockerized appI ll be using DigitalOcean for all of the demos so I would strongly encourage you to create a DigitalOcean account follow along You would learn more by doing To make things even better you can use my referral link to get a free credit that you could use to deploy your virtual machines and test the guide yourself on a few DigitalOcean servers DigitalOcean Free CreditOnce you have your account here s how to deploy your first Droplet server I ll be using Ubuntu so I would recommend that you stick to the same so you could follow along What is a container According to the official definition from the docker com website a container is a standard unit of software that packages up code and all its dependencies so the application runs quickly and reliably from one computing environment to another A Docker container image is a lightweight standalone executable package of software that includes everything needed to run an application code runtime system tools system libraries and settings Container images become containers at runtime and in the case of Docker containers images become containers when they run on Docker Engine Available for both Linux and Windows based applications containerized software will always run the same regardless of the infrastructure Containers isolate software from its environment and ensure that it works uniformly despite differences for instance between development and staging What is a Docker image A Docker Image is just a template used to build a running Docker Container similar to the ISO files and Virtual Machines The containers are essentially the running instance of an image Images are used to share a containerized applications Collections of images are stored in registries like DockerHub or private registries What is Docker Hub DockerHub is the default Docker image registry where we can store our Docker images You can think of it as GitHub for Git projects Here s a link to the Docker Hub You can sign up for a free account That way you could push your Docker images from your local machine to DockerHub Installing DockerNowadays you can run Docker on Windows Mac and of course Linux I will only be going through the Docker installation for Linux as this is my operating system of choice I ll deploy an Ubuntu VM on DigitalOcean so feel free to go ahead and do the same Create a Droplet DigitalOceanOnce your server is up and running SSH to the Droplet and follow along If you are not sure how to SSH you can follow the steps here The installation is really straight forward you could just run the following command it should work on all major Linux distros wget qO shIt would do everything that s needed to install Docker on your Linux machine After that set up Docker so that you could run it as a non root user with the following command sudo usermod aG docker USER To test Docker run the following docker versionTo get some more information about your Docker Engine you can run the following command docker infoWith the docker info command we can see how many running containers that we ve got and some server information The output that you would get from the docker version command should look something like this In case you would like to install Docker on your Windows PC or on your Mac you could visit the official Docker documentation here And That is pretty much it Now you have Docker running on your machine Now we are ready to start working with containers We will pull a Docker image from the DockerHub we will run a container stop it destroy it and more Working with Docker containersOnce you have your Ubuntu Droplet ready ssh to the server and follow along So let s run our first Docker container To do that you just need to run the following command docker run hello worldYou will get the following output We just ran a container based on the hello world Docker Image as we did not have the image locally docker pulled the image from the DockerHub and then used that image to run the container  All that happened was the container ran printed some text on the screen and then exited Then to see some information about the running and the stopped containers run docker ps aYou will see the following information for your hello world container that you just ran root docker docker ps aCONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMESdd hello world hello minutes ago Exited minutes ago focused cartwrightIn order to list the locally available Docker images on your host run the following command docker images Pulling an image from Docker HubLet s run a more useful container like an Apache container for example  First we can pull the image from the docker hub with the docker pull command docker pull webdevops php apacheYou will see the following output Then we can get the image ID with the docker images command docker imagesThe output would look like this Note you do not necessarily need to pull the image this is just for demo pourpouses When running the docker run command if the image is not available locally it will automatically be pulled from Docker Hub After that we can use the docker run command to spin up a new container docker run d p IMAGE IDQuick rundown of the arguments that I ve used d it specifies that I want to run the container in the background That way when you close your terminal the container would remain running p this means that the traffic from the host on port would be forwarded to the container That way you could access the Apache instance which is running inside your docker container directly via your browser The output of the above command would look like this With the docker info command now we can see that we have running container  And with the docker ps command we could see some useful information about the container like the container ID when the container was started and etc root docker docker psCONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMESdddbe fdfeefb entrypoint supervi… About a minute ago Up About a minute tcp gt tcp tcp pedantic murdock Stopping and restarting a Docker ContainerThen you can stop the running container with the docker stop command followed by the container ID docker stop CONTAINER IDIf you need to you can start the container again docker start CONTAINER IDIn order to restart the container you can use the following docker restart CONTAINER ID Accessing a running containerIf you need to attach to the container and run some commands inside the container use the docker exec command docker exec it CONTAINER ID bin bash That way you will get to a bash shell in the container and execute some commands inside the container itself  Then to detach from the interactive shell press CTRL PQ that way you will not stop the container but just detached from the interactive shell Deleting a containerTo delete the container run first make sure that the container is not running and then run docker rm CONTAINER IDIf you would like to delete the container and the image all together just run docker rmi IMAGE IDWith that you now know how to pull Docker images from the Docker Hub run stop start and even attach to Docker containers We are ready to learn how to work with Docker images What are Docker ImagesA Docker Image is just a template used to build a running Docker Container similar to the ISO files and Virtual Machines The containers are essentially the running instance of an image Images are used to share a containerized applications Collections of images are stored in registries like DockerHub or private registries Working with Docker imagesThe docker run command downloads and runs images at the same time But we could also only download images if we wanted to wit the docker pull command For example docker pull ubuntuOr if you want to get a specific version you could also do that with docker pull ubuntu Then to list all of your images use the docker images command docker imagesYou would get a similar output to The images are stored locally on your docker host machine To take a look a the docker hub go to and you would be able to see where the images were just downloaded from For example here s a link to the Ubuntu image that we ve just downloaded There you could find some useful information As Ubuntu is really outdated to delete the image use the docker rmi command docker rmi ubuntu Modifying images ad hocOne of the ways of modifying images is with ad hoc commands For example just start your ubuntu container docker run d p IMAGE IDAfter that to attach to your running container you can run docker exec it container name bin bashInstall whatever packages needed then exit the container just press CTRL P Q To then save your changes run the following docker container commit ID HEREThen list your images and note your image ID docker images lsThe process would look as follows As you would notice your newly created image would not have a name nor a tag so in order tag your image run docker tag IMAGE ID YOUR TAGNow if you list your images you would see the following output Pushing images to Docker HubNow that we have our new image locally let s see how we could push that new image to DockerHub For that you would need a Docker Hub account first Then once you have your account ready in order to authenticate run the following command docker loginThen push your image to the Docker Hub docker push your docker user name of image hereThe output would look like this After that you should be able to see your docker image in your docker hub account in my case it would be here Modifying images with DockerfileWe will go the Dockerfile a bit more in depth in the next blog post for this demo we will only use a simple Dockerfile just as an example Create a file called Dockerfile and add the following content FROM alpineRUN apk updateAll that this Dockerfile does is to update the base Alpine image  To build the image run docker image build t alpine updated v Then you could again list your image and push the new image to the Docker Hub Docker images Knowledge CheckOnce you ve read this post make sure to test your knowledge with this Docker Images Quiz Now that you know how to pull modify and push Docker images we are ready to learn more about the Dockerfile and how to use it What is a DockerfileA Dockerfile is basically a text file that contains all of the required commands to build a certain Docker image  The Dockerfile reference page  It lists the various commands and format details for Dockerfiles Dockerfile exampleHere s a really basic example of how to create a Dockerfile and add our source code to an image First I have a simple Hello world index html file in my current directory that I would add to the container with the following content lt h gt Hello World Bobby Iliev lt h gt And I also have a Dockerfile with the following content FROM webdevops php apache devMAINTAINER Bobby I COPY var www htmlWORKDIR var www htmlEXPOSE Here is a screenshot of my current directory and the content of the files Here is a quick rundown of the Dockerfile FROM The image that we would use as a groundMAINTAINER The person who would be maintaining the imageCOPY Copy some files in the imageWORKDIR The directory where you want to run your commands on startEXPOSE Specify a port that you would like to access the container on Docker buildNow in order to build a new image from our Dockerfile we need to use the docker build command The syntax of the docker build command is the following docker build OPTIONS PATH URL The exact command that we need to run is this one docker build f Dockerfile t your user name php apache dev After the built is complete you can list your images with the docker images command and also run it docker run d p your user name php apache devAnd again just like we did in the last step we can go ahead and publish our image docker logindocker push your docker user name of image hereThen you will be able to see your new image in your Docker Hub account you can pull from the hub directly docker pull your docker user name of image hereFor more information on the docker build make sure to check out the official documentation here Dockerfile Knowledge CheckOnce you ve read this post make sure to test your knowledge with this Dockerfile quiz This is a really basic example you could go above and beyond with your Dockerfiles Now you know how to write a Dockerfile how to build a new image from a Dockerfile using the docker build command In the next step we will learn how to set up and work with the Docker Swarm mode What is Docker Swarm modeAccording to the official Docker docs a swarm is a group of machines that are running Docker and joined into a cluster If you are running a Docker swarm your commands would be executed on a cluster by a swarm manager The machines in a swarm can be physical or virtual After joining a swarm they are referred to as nodes I would do a quick demo shortly on my DigitalOcean account The Docker Swarm consists of manager nodes and worker nodes  The manager nodes dispatch tasks to the worker nodes and on the other side Worker nodes just execute those tasks For High Availability it is recommended to have or manager nodes   Docker ServicesTo deploy an application image when Docker Engine is in swarm mode you have create a service A service is a group of containers of the same image tag Services make it simple to scale your application  In order to have Docker services you must first have your Docker swarm and nodes ready Building a SwarmI ll do a really quick demo on how to build a Docker swarm with managers and workers  For that I m going to deploy droplets on DigitalOcean Then once you ve got that ready install docker just as we did in the Introduction to Docker Part and then just follow the steps here Step Initialize the docker swarm on your first manager node docker swarm init advertise addr your dorplet ip here Step Then to get the command that you need to join the rest of the managers simply run this docker swarm join token managerNote This would provide you with the exact command that you need to run on the rest of the swarm manager nodes Example Step To get the command that you need for joining workers just run docker swarm join token workerThe command for workers would be pretty similar to the command for join managers but the token would be a bit different The output that you would get when joining a manager would look like this Step Then once you have your join commands ssh to the rest of your nodes and join them as workers and managers accordingly Managing the clusterAfter you ve run the join commands on all of your workers and managers in order to get some information for your cluster status you could use these commands To list all of the available nodes run docker node lsNote This command can only be run from a swarm manager Output To get information for the current state run docker infoOutput Promote a worker to managerTo promote a worker to a manager run the following from one of your manager nodes docker node promote node id hereAlso note that each manager also acts as a worker so from your docker info output you should see workers and manager nodes Using ServicesIn order to create a service you need to use the following command docker service create name bobby web p replicas bobbyiliev php apacheNote that I already have my bobbyiliev php apache image pushed to the Docker hub as described in the previous blog posts To get a list of your services run docker service lsOutput Then in order to get a list of the running containers you need to use the following command docker services ps name of your service hereOutput Then you can visit the IP address of any of your nodes and you should be able to see the service We can basically visit any node from the swarm and we will still get the to service Scaling a serviceWe could try shitting down one of the nodes and see how the swarm would automatically spin up a new process on another node so that it matches the desired state of replicas To do that go to your DigitalOcean control panel and hit the power off button for one of your Droplets Then head back to your terminal and run docker services ps name of your service hereOutput In the screenshot above you can see how I ve shutdown the droplet called worker and how the replica bobby web was instantly started again on another node called worker to match the desired state of replicas  To add more replicas run docker service scale name of your service here Output This would automatically spin up more containers you can check this with the docker service ps command docker service ps name of your service hereThen as a test try starting the node that we ve shutdown and check if it picked up any tasks Tip Bringing new nodes to the cluster does not automatically distribute running tasks Deleting a serviceIn order to delete a service all you need to do is to run the following command docker service rm name of your serviceOutput Now you know how to initialize and scale a docker swarm cluster For more information make sure to go through the official Docker documentation here Docker Swarm Knowledge CheckOnce you ve read this post make sure to test your knowledge with this Docker Swarm Quiz ConclusionWell done for going through this Docker introduction tutorial I hope that it was helpful and you ve managed to learn some cool new things about Docker As a next step make sure to spin up a few servers install Docker and play around with all of the commands that you ve learnt from this tutorial Let me know if you have any questions or suggestions Follow me on twitter at bobbyiliev 2021-10-06 11:41:14
海外TECH DEV Community Git Tutorial: How to Fix 18 Common Mistakes https://dev.to/creativetim_official/git-tutorial-how-to-fix-18-common-mistakes-4een Git Tutorial How to Fix Common MistakesThis article is a collection of the most frequently asked questions and their answers when it comes to using Git in a team Some Git questions are more intimidating and may seem difficult to answer even for experienced Git users For example did you forget to include a certain change or make a mistake in your commit message Don t worry In these situations it s common to want to roll back or undo a change made by you or your team You can do this with almost all activities in Git such as commits merges local or remote changes and even uncommitted changes It can all be “undone Here s the table of content for this article How to create a Git branch How to rename a Git branch How to delete a local Git branch How to delete a remote Git branch How to Git checkout remote branch How to edit amend a Git commit message How to undo the last commit How to Git revert to the previous commit How to revert a commit that has been pushed to the remote How to Git revert a single file How to undo Git add How to remove a file from gGit without removing it from your file system Git Pull vs Git FetchHow to force “Git pull to overwrite local files How to push to GitHub when receiving the “need merge error How to create a tag in the GitHub repository How to clone all remote branches in Git How to update or sync a forked repository How to create a Git branch Before starting to create a new branch make sure that your master main is updated with the latest changes git pullAfter the above step you can create your new branch and switch directly to it git checkout b lt new branch name gt Or you can just create the new branch without switching to it git branch lt new branch name gt If you want to switch to your new branch after you created it just use git checkout lt new branch name gt Now that the branch is created you can push it on GitHub git push origin lt new branch name gt How to rename a Git branch In order to rename a Git branch one option would be to first switch to it and follow the below step git checkout lt old branch name gt Afterwards you should see a message that confirms that the switch was successful Switched to branch Now you can rename the branch by git branch m lt new branch name gt Another way to rename your Git branch is by using only one line specifying both the old name and the new name git branch m lt old branch name gt lt new branch name gt Once you have renamed your Git branch it s recommended to check its status git branch a How to delete a local Git branch When developers work on different features they often create other branches separated from the main one with the main code Once the work on a feature is completed it is often recommended to delete the branch As Git doesn t allow you to delete the branch that you are currently on you must first switch to a branch that you are NOT deleting and after that you can delete the branch that you want to git checkout main or master git branch d lt branch name gt If the branch hasn t been pushed or merged you can force the deletion of the branch by using D instead of d How to delete a remote Git branch In order to delete a branch remotely you should use the next command git push lt remote name gt delete lt branch name gt How to Git checkout remote branch When working in a team you might use remote repositories that can be hosted or on a colleague s local copy Each of the remote repositories contains its own branches For switching to a remote branch you will have first to fetch the content of the branch and switch to it after that git fetch all git checkout lt remote branch name gt How to edit amend a Git commit message For some reason in certain cases you would want to change your commit message First you need to know that editing your commit message translates in creating a new commit and replacing the old one If you haven t pushed your commit yet to GitHub and this exists only in your local repository here is an easy way to change your last commit s message Go to the repository that contains your last commit in the command line and type git commit amendNext you need to edit the commit message and save your new commit The next time you push you should be able to see your new commit and message on GitHub As you might have been in the situation that you have already pushed the commit to GitHub don t worry there is still a way to change your most recent commit message In order to do this you will have to force push a commit with an amended message Be advised this is not recommended as it changes the history of your repository so use this option only when it is absolutely needed First follow the steps from above and then type git push force with lease lt branch name gt How to undo the last commit You accidentally committed the wrong files to Git but didn t push the commit to your Git repository yet Because you did not push to a remote repository yet your changes are not public At this point you can undo your changes The easiest way to undo the last Git commit is to execute the git reset command with the “ soft option that will preserve changes done to your files You have to specify the commit to undo which is “HEAD in this case git reset soft HEAD If you want to delete the last commit you can execute the git reset command with “ hard option The changes will be removed from the working directory and from the index so you will lose all modifications git reset hard HEAD Note If you are not familiar with this notation “HEAD means that you want to reset the HEAD the last commit to one commit before in the log history git log oneline How to git revert to the previous commit First of all get commits list in order to have the commit id using the git log command git log onlineIf you want to temporarily go back to the previous commit and then come back to where you were all you have to do is check out the desired commit git checkout lt cada gt Or if you want to make commits while you re there go ahead and make a new branch while you re at it git checkout b old state lt cada gt On the other hand if you want to really get rid of everything you ve done since then but you didn t push any of these commits there is a possibility All you have to do is simply reset git reset hard lt cada gt If you have pushed the commits there is still a way to get rid of them Check the next topic to see how How to revert a commit that has been pushed to the remote If you have already pushed your chain of commits to the remote repository a revert is a nicer way to cancel out changes The revert command adds a new commit at the end of the chain git revert lt cada gt How to Git revert single file You have made multiple changes on a file and committed them Now you want to return to a previous file version You can do the following to revert a single file to its previous status If the file isn t committed you can use git checkout lt filename gt If the file is already committed you should find the hash of the commit and the path to your file and run this command in terminal git checkout lt commit hash gt lt path to file gt e g git checkout lt cada gt assets main cssYou can see the commits which have made modifications to the given file s very easily and you can get the correct commit hash by running the following command git log path to file How to undo Git add You moved multiple files into the staging area with git add command but no longer want to be part of a commit then a simple reset will do the job for all files git reset OR git reset HEAD OR git reset If you want to unstage a single file you can use for single file git reset lt filename gt OR git reset HEAD lt filename gt OR git reset lt filename gt The changes you made will still be in the file files The above set of commands just remove that file files from your staging area The git reset command allows you to reset your current head to a specific state You can reset the state of specific files as well as an entire branch Note HEAD is a reference to the current commit alone is a shortcut for head since Git v How to remove a file from Git without removing it from your file system You committed the wrong file on Git or you forgot to add a file to gitignore and committed it Now you want to remove the file from git but you don t want to remove it from your local development environment Removing a single file with Git without deleting it git rm cached lt filename gt Removing multiple files with Git without deleting them git rm cached lt filename filename filename gt Removing a single directory with Git without deleting it git rm cached lt directory name gt cached will remove from just the index but not allow you to delete the file on the local system The files will be removed in the remote repository when you run git push Git Pull vs Git FetchGit pull and fetch are two commands that are commonly used so knowing the difference between them will come in handy Suppose you re working on a clone repository which is basically a duplicate of another repository In that case it s important to keep it updated with the latest changes that might have been applied to the original In order to do that and bring those changes locally you are going to use the above commands git fetchThis is the command that allows you to download an object from another repository but it will not do any file transferring meaning that will not make any changes locally Basically it is just checking if any changes are available git pullThis is the command that will bring those changes from the remote repository and that will integrate them with your local branch In other words git pull does the same as git fetch only that it is followed by an additional action s e g git merge How to force “git pull to overwrite local files If you want to overwrite everything with a copy from the remote branch note that you will discard all your local changes If you have local commits that you haven t pushed yet those will be lost as well To overwrite reset your local files follow the below steps git fetch all git reset hard origin lt branch name gt How to push to GitHub when receiving the “need merge error If you didn t run a git pull before you tried to push your changes to the branch you d be getting a merge error When you get this error it usually means that someone else pushed a commit to the same branch you are trying to push to but you don t have it locally yet To fix the issue run the below code git pull origin lt branch name gt git push origin lt branch name gt If you want to do a force push meaning that you don t want to merge your local branch with the remote one you can use the below syntax git push f origin lt branch name gt How to create a tag in the GitHub repository Git supports two types of tags lightweight and annotated A lightweight tag is very much like a branch that doesn t change ーit s just a pointer to a specific commit Annotated tags however are stored as full objects in the Git database They re checksummed contain the tagger name email and date have a tagging message It s generally recommended that you create annotated tags Create a lightweight tag git tag lt tagname gt e g git tag v Created Annotated tag recommened git tag a lt tagname gt e g git tag a v or create tag with message git tag a lt tagname gt m tag description e g git tag a v m First release When pushing to your remote repo tags are NOT included by default You will need to explicitly say that you want to push your tags to your remote repo Push all locally tags git push origin tagsPush a single tag git push origin lt tagname gt To list all tags use the following command git tag How to clone all remote branches in Git You can use the git clone command to your local Git It will clone the whole repo to your system then change your current working directory to the cloned repository folder git clone git account name reponame cd reponameIf you have many remote branches that you want to fetch at once do git pull allNext look at the local branches in your repository git branch mainBut there are other branches hiding in your repository You can see these using the a flag git branch a main remotes origin HEAD remotes origin main remotes origin another branchIf you just want to take a quick peek at an upstream branch you can check it out directly git checkout origin another branchBut if you want to work on that branch you ll need to create a local tracking branch which is done automatically by git checkout another branch How to update or sync a forked repository You have successfully forked your interested repository You need to keep it up to date with the original repository The original repository is commonly referred to upstream Open your terminal and navigate to your cloned repository on local computer Your local repository is not directly linked to the original repository You must configure a remote that points to the upstream repository in Git git remote v list all remote git remote add upstream git remote v verify the new upstream repositoryThere are two steps required to sync your repository with the upstream first you must fetch from the remote then you must merge the desired branch into your local branch git fetch upstream git checkout main git merge upstream mainPast the initial upstream setup and main checkout all you need to do is run the following command to sync your main with upstream git pull upstream main Final ThoughtsThanks for reading These are the repetitive questions that developers who use Git ask We hope you found the answer you are looking for If you encounter a problem in Git that is not on our list share it with us in the comments section below Extra ResourcesCheck out our latest repos Soft UI Design SystemSoft UI DashboardPurity UI DashboardMuse Vue Ant Design Dashboard 2021-10-06 11:34:32
Apple AppleInsider - Frontpage News Amazon's Twitch hacked, source code & financial details published https://appleinsider.com/articles/21/10/06/amazons-twitch-hacked-source-code-financial-details-published?utm_medium=rss Amazon x s Twitch hacked source code amp financial details publishedThe entire Twitch source code user comment history and detailed financial records has reportedly been posted online by an anonymous hacker TwitchTwitch is the video and gaming service owned by Amazon Now the entirety of its source code for the service its mobile desktop and client apps and an unreleased Steam competitor have been leaked Read more 2021-10-06 11:11:42
海外TECH Engadget Twitch's source code and streamer payment figures have been leaked in apparent hack https://www.engadget.com/twitch-data-breach-reveals-creator-payouts-source-code-and-more-112012011.html?src=rss Twitch x s source code and streamer payment figures have been leaked in apparent hackHackers claim to have accessed Twitch and leaked a vast amount of company data including proprietary code creator payouts and the quot entirety of Twitch tv quot Video Games Chronicle has reported that Twitch is aware of the breach according to the attackers but has yet to respond publicly nbsp On top of of the Twitch tv code the attackers said they stole the the site s mobile desktop and console Twitch clients It also accessed quot proprietary SDKs and internal AWS services used by Twitch quot other properties like IGDB and CurseForge an unreleased Steam competitor from Amazon Game Studios code named Vapor and Twitch SOC internal red teaming tools It also shows creator payouts from until now including top streamers like Nickmercs TimTheTatMan and xQc nbsp Although we haven t verified the claim that quot the entirety quot of Twitch s source code has been leaked the files in the GB repository do appear to be genuine and the payout figures for almost million streamers seem to be present The hackers said that the leak which includes source code from almost internal Github repositories is also just quot part one quot of a larger release It doesn t appear that information like user passwords addresses and banking information were revealed but that can t be ruled out in a future drop If you have a Twitch account you should activate two factor authentication so that bad actors can t log into your account if your password has been stolen The group also stated that Twitch s community is a quot disgusting toxic cesspool quot so the action may be related to recent hate raids that prompted streamers to take a day off in protest Twitch has previously said that it s trying to stop the hate raid problem but that it wasn t a quot simple fix quot nbsp It s not clear yet how attackers could have stolen such a large amount of data especially considering that Twitch is owned by Amazon which operates one of the largest web hosting companies in the world nbsp 2021-10-06 11:20:12
海外TECH Engadget The Morning After: Facebook's October 4th outage, explained https://www.engadget.com/the-morning-after-facebooks-october-4th-outage-explained-111508085.html?src=rss The Morning After Facebook x s October th outage explainedWe ll get into why Facebook saw its entire business fall off a cliff on Monday but first e readers It s a device category we don t see much development in ーprobably because it s very much a device for reading text and not much else Amazon s Kindle thanks to its powerful online e book store generally has the category sewn up with several e reader options from luxe to sometimes slates But I love an underdog ーand most things with an e ink display Like this and this KoboSo I have time for Kobo s new Sage e reader which lets you add handwritten notes with a stylus It has an inch x e ink screen that adjusts brightness and color depending on the time of day You can also convert to plain text your handwritten e notes made on e books and PDFs and send them to other devices ーa feature Kobo already offered on its larger and more expensive Elipsa If you re looking for an e reader that doesn t have Amazon hooks ーor you need to take notes on your e books ーyou can pre order the Sage now It starts shipping on October th ーMat SmithFacebook explains how its October th outage startedIt should have been routine maintenance Following the massive service outage that took out all of its services Facebook has published a blog post detailing what happened According to Santosh Janardhan the company s vice president of infrastructure the outage started with what should have been routine maintenance A command was issued that was supposed to assess the availability of the backbone network that connects all of Facebook s disparate computing facilities Instead the order unintentionally took all those connections down Matters were made worse because the outage made it impossible for Facebook engineers to connect to the servers they needed to fix Continue reading Microsoft Surface Pro reviewIt addresses many of our earlier complaints but that price…EngadgetThe Surface Pro addresses many of the issues we had with the Pro including a gorgeous premium design Editor in Chief Dana Wollman put the hybrid device through its paces and she particularly loved the Hz display But the starting price is higher than its predecessor ーstill not including a keyboard That makes it tougher to justify picking the Surface Pro over a comparably priced laptop Especially at a time when there are so many excellent options to choose from nbsp Continue reading Surface Laptop Studio reviewA better Surface Book a missed opportunityEngadgetOh we re not done Microsoft s Laptop Studio was also in for review Devindra Hardawar tested it out and he believes the Surface Laptop Studio is a solid successor to the Surface Book While it s faster than the Book and it has a gorgeous flexible screen it s oddly lacking in sheer CPU power compared to the competition He explains all in his full review Continue reading The Kingdom Hearts trilogy is coming to Nintendo SwitchBut in streaming cloud form The three main Kingdom Hearts games are coming to Nintendo Switch You ll be able to play Kingdom Hearts HD ReMix Kingdom Hearts HD Final Chapter Prologue and Kingdom Hearts III They re all cloud streaming games on Switch so you ll need a good internet connection to play them The news came off the back of the announcement that Kingdom Hearts protagonist Sora will be final character to join Super Smash Bros Ultimate Sora means sky in Japanese so there s some irony in the game series being streamed from the cloud Continue reading Google s Pixel launch event happens on October thFind out all about the company s latest flagship phones The company plans to reveal everything there is to know about the Pixel lineup on October th at PM ET Months ago the company spilled some info on the Pixel and Pixel Pro including what the phones look like In August Google said Tensor the first system on chip it designed will feature in the new additions to the Pixel series Expect some substantial camera upgrades with the Pixel Pro packing x optical zoom and an additional telephoto option In comparison Apple s iPhone Pro tops out at x optical zoom Continue reading The biggest news stories you might have missedTesla must pay million in discrimination lawsuitYubico s new security keys have fingerprint readers for added protectionMicrosoft Surface Go review Third time isn t quite the charmAmazon s Kindle is on sale for right nowA Russian crew is shooting the first feature film on the ISSThe Razer Book laptop gets a price cut to 2021-10-06 11:15:08
海外科学 NYT > Science Nobel Prize in Chemistry Awarded for Tool to Build Molecules https://www.nytimes.com/2021/10/06/science/nobel-prize-chemistry.html Nobel Prize in Chemistry Awarded for Tool to Build MoleculesBenjamin List and David W C MacMillan were honored for work that spurred research into new drugs and reduced the effect of chemistry on the environment 2021-10-06 11:21:32
医療系 医療介護 CBnews 日医会長、岸田内閣に全力で協力する意向-医療・介護職の所得向上、「非常にいいこと」 https://www.cbnews.jp/news/entry/20211006201256 中川俊男 2021-10-06 20:25:00
ニュース BBC News - Home Boris Johnson: It is our mission as Tories to promote opportunity https://www.bbc.co.uk/news/uk-politics-58817217?at_medium=RSS&at_campaign=KARANGA conference 2021-10-06 11:42:11
ニュース BBC News - Home China-Taiwan military tensions 'worst in 40 years' https://www.bbc.co.uk/news/world-asia-58812100?at_medium=RSS&at_campaign=KARANGA aerial 2021-10-06 11:24:35
ニュース BBC News - Home Pig cull threat not being taken seriously by PM, says vet https://www.bbc.co.uk/news/uk-58813959?at_medium=RSS&at_campaign=KARANGA abattoirs 2021-10-06 11:11:34
ニュース BBC News - Home Tesco shrugs off supply concerns as sales surge https://www.bbc.co.uk/news/business-58813624?at_medium=RSS&at_campaign=KARANGA chain 2021-10-06 11:06:16
ニュース BBC News - Home Why are some footballers vaccine hesitant & what happens next? https://www.bbc.co.uk/sport/football/58806500?at_medium=RSS&at_campaign=KARANGA Why are some footballers vaccine hesitant amp what happens next With the Premier League club managers politicians and football authorities all encouraging vaccinations why are some players still hesitant and what can be done 2021-10-06 11:26:23
ニュース BBC News - Home Civil partnership: Call for same sex affairs to be grounds for split https://www.bbc.co.uk/news/uk-wales-58804475?at_medium=RSS&at_campaign=KARANGA affair 2021-10-06 11:45:39
ニュース BBC News - Home American rivals DeChambeau and Koepka to go head-to-head https://www.bbc.co.uk/sport/golf/58817820?at_medium=RSS&at_campaign=KARANGA vegas 2021-10-06 11:26:39
北海道 北海道新聞 胆振、日高管内 感染者ゼロ 新型コロナ https://www.hokkaido-np.co.jp/article/597253/ 新型コロナウイルス 2021-10-06 20:19:00
北海道 北海道新聞 米ロ外相、イラン核で電話協議 合意の早期再建で協力か https://www.hokkaido-np.co.jp/article/597251/ 電話 2021-10-06 20:09:00
北海道 北海道新聞 飲酒運転の常習性を強調 千葉、児童死傷事故初公判 https://www.hokkaido-np.co.jp/article/597250/ 千葉県八街市 2021-10-06 20:07:00
北海道 北海道新聞 独と米の2氏にノーベル化学賞 新たな触媒開発 https://www.hokkaido-np.co.jp/article/597249/ 科学アカデミー 2021-10-06 20:07:00
ビジネス 東洋経済オンライン ヤクルト高津臣吾監督「去年と違う」強気な理由 今年は心の底から燃えるゲームが続いている | アルファポリス | 東洋経済オンライン https://toyokeizai.net/articles/-/460212?utm_source=rss&utm_medium=http&utm_campaign=link_back 東京ヤクルト 2021-10-06 21:00:00
IT 週刊アスキー メインキャラの水着衣装が登場!『英雄伝説 黎の軌跡』の最新DLCを10月7日に配信 https://weekly.ascii.jp/elem/000/004/071/4071353/ playstation 2021-10-06 20:10:00

コメント

このブログの人気の投稿

投稿時間:2021-06-17 05:05:34 RSSフィード2021-06-17 05:00 分まとめ(1274件)

投稿時間:2021-06-20 02:06:12 RSSフィード2021-06-20 02:00 分まとめ(3871件)

投稿時間:2020-12-01 09:41:49 RSSフィード2020-12-01 09:00 分まとめ(69件)